xdr v0.1.1 XDR.Type.VariableOpaque View Source
RFC 4506, Section 4.10 - Variable-length Opaque Data
Link to this section Summary
Functions
Decodes a valid variable opaque xdr binary, removing the 4-byte length and any provided padding
Encodes a valid variable opaque binary, prepending the 4-byte length of the binary and appending any necessary padding
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 | :max_length_too_large | :xdr_length_exceeds_defined_max | :invalid_xdr_length | :invalid_padding}
A binary of max-length 2^32 - 1
Link to this section Functions
Link to this function
decode(xdr, max \\ 4294967295)
View Source
decode(xdr :: xdr(), max :: max()) :: {:ok, {opaque :: t(), rest :: XDR.Type.Base.xdr()}} | decode_error()
Decodes a valid variable opaque xdr binary, removing the 4-byte length and any provided padding
Encodes a valid variable opaque binary, prepending the 4-byte length of the binary and appending any necessary padding
Determines if a value is a binary of a valid length