XDR kommit v0.1.0 XDR.HyperUInt View Source

This module is in charge of process the Hyper Unsigned Integer types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every integer structure has a datum which represent the integer value which you try to encode

Functions

This function is in charge of decode the XDR value which represents an Hyper Unsigned Integer value if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the binary value

This function is in charge of decode the XDR value which represents an Hyper Unsigned Integer value if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the binary value

This function is in charge of encoding the Hyper Unsigned Integer received by parameter if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the hyper int

This function is in charge of encoding the Hyper Unsigned Integer received by parameter if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the hyper int

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

Link to this section Types

Specs

t() :: %XDR.HyperUInt{datum: integer() | binary()}

Every integer structure has a datum which represent the integer value which you try to encode

Link to this section Functions

Link to this function

decode_xdr(bytes, opts \\ nil)

View Source

Specs

decode_xdr(bytes :: binary(), opts :: any()) :: {:ok, {t(), binary()}}

This function is in charge of decode the XDR value which represents an Hyper Unsigned Integer value if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the binary value

Returns a tuple with the Hyper Unsigned Integer resulted from decode the XDR value and its remaining bits

Link to this function

decode_xdr!(bytes, opts \\ nil)

View Source

Specs

decode_xdr!(bytes :: binary(), opts :: any()) :: {t(), binary()}

This function is in charge of decode the XDR value which represents an Hyper Unsigned Integer value if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the binary value

Returns the Hyper Unsigned Integer resulted from decode the XDR value and its remaining bits

Specs

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

This function is in charge of encoding the Hyper Unsigned Integer received by parameter if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the hyper int

Returns a tuple with the XDR resulted from encoding the Hyper Unsigned Integer value

Specs

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

This function is in charge of encoding the Hyper Unsigned Integer received by parameter if the parameters are wrong an error will be raised, it recieves an XDR.HyperUInt structure which contains the hyper int

Returns the XDR resulted from encoding the Hyper Unsigned Integer value

Specs

new(datum :: integer() | binary()) :: t()

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

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