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

This module manages the Variable-Length Opaque Data type based on the RFC4506 XDR Standard.

Link to this section Summary

Types

t()

XDR.VariableOpaque structure type specification.

Functions

Decode the Variable-Length Opaque Data in XDR format to a XDR.VariableOpaque structure.

Decode the Variable-Length Opaque Data in XDR format to a XDR.VariableOpaque structure. If the binaries are not valid, an exception is raised.

Encode a XDR.VariableOpaque structure into a XDR format.

Encode a XDR.VariableOpaque structure into a XDR format. If the opaque is not valid, an exception is raised.

Create a new XDR.VariableOpaque structure with the opaque and max_size passed.

Link to this section Types

Specs

opaque() :: binary() | nil

Specs

t() :: %XDR.VariableOpaque{max_size: integer(), opaque: opaque()}

XDR.VariableOpaque structure type specification.

Link to this section Functions

Link to this function

decode_xdr(bytes, opaque \\ %{max_size: 4294967295})

View Source

Decode the Variable-Length Opaque Data in XDR format to a XDR.VariableOpaque structure.

Link to this function

decode_xdr!(bytes, opaque \\ %{max_size: 4294967295})

View Source

Decode the Variable-Length Opaque Data in XDR format to a XDR.VariableOpaque structure. If the binaries are not valid, an exception is raised.

Encode a XDR.VariableOpaque structure into a XDR format.

Encode a XDR.VariableOpaque structure into a XDR format. If the opaque is not valid, an exception is raised.

Link to this function

new(opaque, max_size \\ 4294967295)

View Source

Specs

new(opaque :: opaque(), max_size :: integer()) :: t()

Create a new XDR.VariableOpaque structure with the opaque and max_size passed.