xdr v0.1.2 XDR.Type.VariableArray View Source

RFC 4506, Section 4.13 - Variable-length Array

Link to this section Summary

Types

t()

A binary of any length

Functions

Decodes an fixed array xdr binary by truncating it to the desired length

Encodes a fixed array into a binary

Determines if a value is a binary of a valid length

Link to this section Types

Link to this type decode_error() View Source
decode_error() :: {:error, :invalid | :xdr_too_small}

A binary of any length

Link to this section Functions

Link to this function decode(xdr, type, max \\ 4294967295) View Source
decode(xdr :: xdr(), type :: module(), max :: max()) ::
  {:ok, {array :: t(), rest :: XDR.Type.Base.xdr()}} |
  decode_error()

Decodes an fixed array xdr binary by truncating it to the desired length

Link to this function encode(array, type, max \\ 4294967295) View Source
encode(array :: t(), type :: module(), max :: max()) ::
  {:ok, xdr :: xdr()} |
  {:error, :invalid}

Encodes a fixed array into a binary

Link to this function valid?(array, type, max \\ 4294967295) View Source
valid?(array :: t(), type :: module(), max :: max()) :: boolean()

Determines if a value is a binary of a valid length