XDR kommit v0.1.0 XDR.UInt View Source

This module is in charge of process the unsigned integer types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every Unsigned 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 unsigned integer value if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the binary value to decode

This function is in charge of decode the XDR value which represents an unsigned integer value if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the binary value to decode

This function is in charge of encoding an unsigned integers into an XDR if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the value to encode

This function is in charge of encoding an unsigned integers into an XDR if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the value to encode

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

Link to this section Types

Specs

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

Every Unsigned 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(binary(), any()) :: {:ok, {t(), binary()}}

This function is in charge of decode the XDR value which represents an unsigned integer value if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the binary value to decode

Returns a tuple with the integer resulted from decode the XDR value

Link to this function

decode_xdr!(bytes, opts \\ nil)

View Source

Specs

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

This function is in charge of decode the XDR value which represents an unsigned integer value if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the binary value to decode

Returns the integer resulted from decode the XDR value

Specs

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

This function is in charge of encoding an unsigned integers into an XDR if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the value to encode

Returns a tuple with the XDR resulted from encode the unsigned integer value

Specs

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

This function is in charge of encoding an unsigned integers into an XDR if the parameters are wrong an error will be raised, it receives a XDR.UInt structure which contains the value to encode

Returns the XDR resulted from encode the unsigned integer value

Specs

new(datum :: any()) :: t()

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

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