peloton.persistence.PayloadCodec
An encoder and decoder type class for a given payload type A
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Known subtypes
-
Members list
Decodes (deserializes) a payload of type A
from a given byte array
Decodes (deserializes) a payload of type A
from a given byte array
This method is effectful (because decoding could fail) and is therefore wrapped in an IO
context.
Value parameters
-
bytes
-
A raw byte array
Attributes
-
Returns
-
An IO
effect that returns the decoded payload of type A
on success
Encodes (serializes) a given payload of type A
to a raw byte array.
Encodes (serializes) a given payload of type A
to a raw byte array.
This method is effectful (because encoding could fail) and is therefore wrapped in an IO
context.
Value parameters
-
payload
-
The payload of type A
Attributes
-
Returns
-
An IO
effect that returns an Array[Byte]
on success