Crate xdr_codec [−] [src]
XDR runtime encoding/decoding
This crate provides runtime support for encoding and decoding XDR data. It is intended to be used with code generated by the "xdrgen" crate, but it can also be used with hand-written code.
It provides two key traits - Pack
and Unpack
- which all
encodable types must implement. It also provides the helper
functions pack()
and unpack()
to simplify the API.
Modules
record |
XDR record marking |
Structs
Opaque |
Wrapper for XDR opaque data. |
Enums
Error |
XDR errors |
Traits
Pack |
Basic packing trait. |
Read |
The |
Unpack |
Basic unpacking trait |
Write |
A trait for objects which are byte-oriented sinks. |
Functions
pack |
Serialization (packing) helper. |
pack_array |
Pack a fixed-size array. |
pack_flex |
Pack a dynamically sized array, with size limit check. |
pack_opaque_array |
Pack a fixed-size byte array |
pack_opaque_flex |
Pack a dynamically sized opaque array, with size limit check. |
pack_string |
Pack a string with size limit check. |
padding |
Compute XDR padding. |
unpack |
Deserialization (unpacking) helper function |
unpack_array |
Unpack a fixed-sized array |
unpack_flex |
Unpack a (perhaps) length-limited array |
unpack_opaque_array |
Unpack a fixed-sized opaque array |
unpack_opaque_flex |
Unpack a (perhaps) length-limited opaque array |
unpack_string |
Unpack (perhaps) length-limited string |
Type Definitions
Result |
A wrapper around |