StableArtifactId

org.sigilaris.node.gossip.GossipCursorModel$package.StableArtifactId

Companion for StableArtifactId providing parsing and construction.

Attributes

Source
GossipCursorModel.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def fromBytes(bytes: ByteVector): Either[String, StableArtifactId]

Creates a stable artifact id from raw bytes.

Creates a stable artifact id from raw bytes.

Value parameters

bytes

the byte content

Attributes

Returns

the id, or an error if empty

Source
GossipCursorModel.scala
def fromHex(value: String): Either[String, StableArtifactId]

Parses a hex-encoded stable artifact id.

Parses a hex-encoded stable artifact id.

Value parameters

value

the hex string

Attributes

Returns

the id, or an error message

Source
GossipCursorModel.scala
def unsafeFromBytes(bytes: ByteVector): StableArtifactId

Creates a stable artifact id from raw bytes, throwing on invalid input.

Creates a stable artifact id from raw bytes, throwing on invalid input.

Value parameters

bytes

the byte content

Attributes

Returns

the id

Throws
IllegalArgumentException

if the bytes are empty

Source
GossipCursorModel.scala
def unsafeFromHex(value: String): StableArtifactId

Parses a hex-encoded stable artifact id, throwing on invalid input.

Parses a hex-encoded stable artifact id, throwing on invalid input.

Value parameters

value

the hex string

Attributes

Returns

the id

Throws
IllegalArgumentException

if the hex is invalid or empty

Source
GossipCursorModel.scala

Givens

Extensions

Extensions

extension (id: StableArtifactId)
def bytes: ByteVector

Attributes

Source
GossipCursorModel.scala
def toHexLower: String

Attributes

Source
GossipCursorModel.scala