ankh v0.4.4 Ankh.Frame.Encodable protocol

Protocol for encoding/decoding data types to/from wire format

Link to this section Summary

Types

Encode/Decode options

t()

Data type conforming to the Ankh.Frame.Encodable protocol

Functions

Decodes a binary into an Ankh.Frame.Encodable conforming data type

Encodes an Ankh.Frame.Encodable conforming data type into an IO list

Link to this section Types

Link to this type options()
options() :: Keyword.t()

Encode/Decode options

Link to this type t()
t() :: term() | nil

Data type conforming to the Ankh.Frame.Encodable protocol

Link to this section Functions

Link to this function decode!(struct, binary, options \\ [])

Decodes a binary into an Ankh.Frame.Encodable conforming data type

Parameters:

  • data: data type conforming to the Ankh.Frame.Encodable protocol
  • binary: data to decode into the struct
  • options: options to pass as context to the decoding function
Link to this function encode!(data, options \\ [])

Encodes an Ankh.Frame.Encodable conforming data type into an IO list

Parameters:

  • data: data type conforming to the Ankh.Frame.Encodable protocol
  • options: options to pass as context to the encoding function