XDR.Enum (Elixir XDR v0.3.11) View Source

This module manages the Enumeration type based on the RFC4506 XDR Standard.

Link to this section Summary

Types

t()

XDR.Enum structure type specification.

Functions

Decode the Enumeration in XDR format to a XDR.Enum structure.

Decode the Enumeration in XDR format to a XDR.Enum structure. If the binaries are not valid, an exception is raised.

Encode a XDR.Enum structure into a XDR format.

Encode a XDR.Enum structure into a XDR format. If the declarations or identifier of the enum is not valid, an exception is raised.

Create a new XDR.Enum structure with the declarations and identifier passed.

Link to this section Types

Specs

t() :: %XDR.Enum{declarations: keyword(), identifier: atom()}

XDR.Enum structure type specification.

Link to this section Functions

Decode the Enumeration in XDR format to a XDR.Enum structure.

Link to this function

decode_xdr!(bytes, enum)

View Source

Decode the Enumeration in XDR format to a XDR.Enum structure. If the binaries are not valid, an exception is raised.

Encode a XDR.Enum structure into a XDR format.

Encode a XDR.Enum structure into a XDR format. If the declarations or identifier of the enum is not valid, an exception is raised.

Link to this function

new(declarations, identifier)

View Source

Specs

new(declarations :: list(), identifier :: atom()) :: t()

Create a new XDR.Enum structure with the declarations and identifier passed.