XDR kommit v0.1.0 XDR.Struct View Source

this module is in charge of process the struct types based on the RFC4056 XDR Standard

Link to this section Summary

Types

t()

Every Struct structure has a component keyword which contains the keys and its representation value

Functions

This function is in charge of decode an XDR into an structure, it receives an XDR.Struct structure which contains the binary to encode

This function is in charge of decode an XDR into an structure, it receives an XDR.Struct structure which contains the binary to encode

This function is in charge of encode structure types into and XDR format, it receives an XDR.Struct structure which contains the structure to encode

This function is in charge of encode structure types into and XDR format, it receives an XDR.Struct structure which contains the structure to encode

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

Link to this section Types

Specs

t() :: %XDR.Struct{components: keyword()}

Every Struct structure has a component keyword which contains the keys and its representation value

Link to this section Functions

Specs

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

This function is in charge of decode an XDR into an structure, it receives an XDR.Struct structure which contains the binary to encode

returns an :ok tuple with the resulted struct

Link to this function

decode_xdr!(bytes, struct)

View Source

Specs

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

This function is in charge of decode an XDR into an structure, it receives an XDR.Struct structure which contains the binary to encode

returns an :ok tuple with the resulted struct

Specs

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

This function is in charge of encode structure types into and XDR format, it receives an XDR.Struct structure which contains the structure to encode

returns an :ok tuple with the resulted XDR

Specs

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

This function is in charge of encode structure types into and XDR format, it receives an XDR.Struct structure which contains the structure to encode

returns the resulted XDR

Specs

new(components :: keyword()) :: t()

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

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