Trait xdr_codec::Pack [] [src]

pub trait Pack<Out: Write> {
    fn pack(&self, out: &mut Out) -> Result<usize>;
}

Basic packing trait.

This trait is used to implement XDR packing any Rust type into a Write stream. It returns the number of bytes the encoding took.

This crate provides a number of implementations for all the basic XDR types, and generated code will generally compose them to pack structures, unions, etc.

Streams generated by Pack can be consumed by Unpack.

Required Methods

fn pack(&self, out: &mut Out) -> Result<usize>

Implementors