BinaryCodec

endless.transaction.BinaryCodec
See theBinaryCodec companion object
trait BinaryCodec[A] extends Encoder[A], Decoder[A]

Type class for encoding and decoding entity IDs to and from binary

Attributes

Companion
object
Graph
Supertypes
trait Decoder[A]
trait Encoder[A]
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def contramap[B](f: B => A): Encoder[B]

Converts this encoder to a Encoder[B] using the supplied B => A

Converts this encoder to a Encoder[B] using the supplied B => A

Attributes

Inherited from:
Encoder
def decode(payload: Array[Byte]): A

Decode binary array into value of type A

Decode binary array into value of type A

Value parameters

payload

array of bytes

Attributes

Returns

value

Inherited from:
Decoder
def encode(a: A): Array[Byte]

Encode value of type A into a binary array

Encode value of type A into a binary array

Value parameters

a

value

Attributes

Returns

corresponding byte array

Inherited from:
Encoder
def map[B](f: A => B): Decoder[B]

Converts this decoder to a Decoder[B] using the supplied A => B

Converts this decoder to a Decoder[B] using the supplied A => B

Attributes

Inherited from:
Decoder