XDR kommit v0.1.0 XDR.String View Source

this module is in charge of process the String types based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

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

Functions

this function is in charge of decode an XDR into a string, it receives and XDR.String structure which contains the binary to encode

this function is in charge of decode an XDR into a string, it receives and XDR.String structure which contains the binary to encode

this function is in charge of encode an string into an XDR format,it receives an XDR.String which contains the value to encode

this function is in charge of encode an string into an XDR format,it receives an XDR.String which contains the value to encode

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

Link to this section Types

Specs

t() :: %XDR.String{max_length: integer(), string: String.t() | binary()}

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

Link to this section Functions

Link to this function

decode_xdr(bytes, struct \\ %{max_length: 4294967295})

View Source

Specs

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

this function is in charge of decode an XDR into a string, it receives and XDR.String structure which contains the binary to encode

returns an :ok tuple with the resulted string

Link to this function

decode_xdr!(bytes, struct \\ %{max_length: 4294967295})

View Source

Specs

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

this function is in charge of decode an XDR into a string, it receives and XDR.String structure which contains the binary to encode

returns the resulted string

Specs

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

this function is in charge of encode an string into an XDR format,it receives an XDR.String which contains the value to encode

returns an :ok tuple with the resulted XDR

Specs

encode_xdr!(map()) :: binary()

this function is in charge of encode an string into an XDR format,it receives an XDR.String which contains the value to encode

returns the resulted XDR

Link to this function

new(string, max_length \\ 4294967295)

View Source

Specs

new(string :: bitstring(), max_length :: integer()) :: t()

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

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