ankh v0.3.1 Ankh.Frame.Encoder protocol

Protocol for encoding/decoding frame structs

Expects a struct with the format injected by use Ankh.Frame

Summary

Types

t()

Struct conforming to the Ankh.Frame.Encoder protocol

Functions

Decodes a binary into a conforming struct

Encodes a conforming struct into binary

Types

t()
t() :: struct

Struct conforming to the Ankh.Frame.Encoder protocol

Functions

decode!(struct, binary, options)
decode!(t, binary, Keyword.t) :: t

Decodes a binary into a conforming struct

Parameters:

  • struct: struct conforming to the Ankh.Frame.Encoder protocol
  • binary: data to decode into the struct
  • options: options to pass as context to the decoding function
encode!(struct, options)
encode!(t, Keyword.t) :: binary

Encodes a conforming struct into binary

Parameters:

  • struct: struct conforming to the Ankh.Frame.Encoder protocol
  • options: options to pass as context to the encoding function