Trait packed_struct::PackedStructSlice[][src]

pub trait PackedStructSlice where
    Self: Sized
{ fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>;
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>;
fn packed_bytes() -> usize; fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError> { ... } }

A structure that can be packed and unpacked from a slice of bytes.

Required Methods

Pack the structure into an output buffer.

Unpack the structure from a buffer.

Number of bytes that this structure demands for packing or unpacking.

Provided Methods

Pack the structure into a new byte vector.

Implementations on Foreign Types

impl PackedStructSlice for bool
[src]

impl PackedStructSlice for u8
[src]

impl PackedStructSlice for i8
[src]

Implementors