Ankh.HTTP2.Frame.Encodable protocol (ankh v0.12.1)

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.HTTP2.Frame.Encodable protocol

Functions

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

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

Link to this section Types

Specs

options() :: Keyword.t()

Encode/Decode options

Specs

t() :: any()

Data type conforming to the Ankh.HTTP2.Frame.Encodable protocol

Link to this section Functions

Link to this function

decode(struct, binary, options \\ [])

Specs

decode(t(), binary(), options()) :: {:ok, t()} | {:error, any()}

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

Parameters:

  • data: data type conforming to the Ankh.HTTP2.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 \\ [])

Specs

encode(t(), options()) :: {:ok, iodata()} | {:error, any()}

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

Parameters: