XDR kommit v0.1.0 XDR.Optional View Source

This module is in charge of process the Optional data types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every optional type contains the type of the data to process

Functions

Decode Optional types

Decode Optional types

Encode Optional types

Encode Optional types

This function provides an easy way to create a new Optional type

Link to this section Types

Specs

t() :: %XDR.Optional{type: nil | any()}

Every optional type contains the type of the data to process

Link to this section Functions

Specs

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

Decode Optional types

returns an :ok tuple with the decoded type

Link to this function

decode_xdr!(bytes, struct)

View Source

Specs

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

Decode Optional types

returns the decoded type

Specs

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

Encode Optional types

returns an :ok tuple with the encoded XDR

Specs

encode_xdr!(t()) :: binary()

Encode Optional types

returns the encoded XDR

Specs

new(any()) :: nil | t()

This function provides an easy way to create a new Optional type