XDR kommit v0.1.0 XDR.DoubleFloat View Source

This module is in charge of process the Double-Precision Floating-Point types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every double float structure has a float which represent the Double-Precision Floating-Point value which you try to encode

Functions

This function is in charge of decode the XDR value which represents an Double Floating Point value if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contanis the binary to decode

This function is in charge of decode the XDR value which represents an Double Floating Point value if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contanis the binary to decode

this function is in charge of encoding a Double Floating Point value into an XDR if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contains the Double-Precision Floating-Point to encode

this function is in charge of encoding a Double Floating Point value into an XDR if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contains the Double-Precision Floating-Point to encode

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

Link to this section Types

Specs

t() :: %XDR.DoubleFloat{float: integer() | float() | binary()}

Every double float structure has a float which represent the Double-Precision Floating-Point 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 Double Floating Point value if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contanis the binary to decode

Returns a tuple with the Double Floating Point 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 Double Floating Point value if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contanis the binary to decode

Returns the Double Floating Point resulted from decode the XDR value and its remaining bits

Link to this function

encode_xdr(double_float)

View Source

Specs

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

this function is in charge of encoding a Double Floating Point value into an XDR if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contains the Double-Precision Floating-Point to encode

Returns a tuple with the XDR resulted from encoding the Double Floating Point value

Specs

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

this function is in charge of encoding a Double Floating Point value into an XDR if the parameters are wrong an error will be raised, it receives an XDR.DoubleFloat structure which contains the Double-Precision Floating-Point to encode

Returns the XDR resulted from encoding the Double Floating Point value

Specs

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

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

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

Link to this macro

valid_float?(value)

View Source (macro)