XDR kommit v0.1.0 XDR.FixedArray View Source

this module is in charge of process the Fixed Array types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every FixedArray structure has the list of elements to encode,the type of these elements and the length of the list

Functions

this function is in charge of decode an XDR into a list, it receives an XDR.FixedArray structure which contains the data to decode the binary

this function is in charge of decode an XDR into a list, it receives an XDR.FixedArray structure which contains the data to decode the binary

this function is in charge of encode a list into an XDR, it receives an XDR.FixedArray structure which contains the data needed to encode the fixed array

this function is in charge of encode a list into an XDR, it receives an XDR.FixedArray structure which contains the data needed to encode the fixed array

this function provides an easy way to create an XDR.FixedArray type

Link to this section Types

Specs

t() :: %XDR.FixedArray{
  elements: list() | nil,
  length: integer(),
  type: module()
}

Every FixedArray structure has the list of elements to encode,the type of these elements and the length of the list

Link to this section Functions

Specs

decode_xdr(bytes :: binary(), struct :: map()) :: {:ok, {list(), binary()}}

this function is in charge of decode an XDR into a list, it receives an XDR.FixedArray structure which contains the data to decode the binary

returns an :ok tuple with the resulted list

Link to this function

decode_xdr!(bytes, struct)

View Source

Specs

decode_xdr!(bytes :: binary(), struct :: map()) :: {list(), binary()}

this function is in charge of decode an XDR into a list, it receives an XDR.FixedArray structure which contains the data to decode the binary

returns the resulted list

Specs

encode_xdr(map()) :: {:ok, binary()}

this function is in charge of encode a list into an XDR, it receives an XDR.FixedArray structure which contains the data needed to encode the fixed array

returns an :ok tuple with the resulted XDR

Link to this function

encode_xdr!(fixed_array)

View Source

Specs

encode_xdr!(map()) :: binary()

this function is in charge of encode a list into an XDR, it receives an XDR.FixedArray structure which contains the data needed to encode the fixed array

returns the resulted XDR

Link to this function

new(elements, type, length)

View Source

Specs

new(elements :: list() | binary(), type :: module(), length :: integer()) :: t()

this function provides an easy way to create an XDR.FixedArray type

returns a XDR.FixedArray struct with the value received as parameter