[][src]Trait packed_struct::PackedStructSlice

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

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

Required methods

pub fn pack_to_slice(&self, output: &mut [u8]) -> PackingResult<()>[src]

Pack the structure into an output buffer.

pub fn unpack_from_slice(src: &[u8]) -> PackingResult<Self>[src]

Unpack the structure from a buffer.

pub fn packed_bytes_size(opt_self: Option<&Self>) -> PackingResult<usize>[src]

Number of bytes that the type or this particular instance of this structure demands for packing or unpacking.

Loading content...

Provided methods

Loading content...

Implementations on Foreign Types

impl<A, B, C, D, E, F, G, H, I, J> PackedStructSlice for (A, B, C, D, E, F, G, H, I, J) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice,
    F: PackedStructSlice,
    G: PackedStructSlice,
    H: PackedStructSlice,
    I: PackedStructSlice,
    J: PackedStructSlice
[src]

impl<A, B, C, D, E, F, G, H, I> PackedStructSlice for (A, B, C, D, E, F, G, H, I) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice,
    F: PackedStructSlice,
    G: PackedStructSlice,
    H: PackedStructSlice,
    I: PackedStructSlice
[src]

impl<A, B, C, D, E, F, G, H> PackedStructSlice for (A, B, C, D, E, F, G, H) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice,
    F: PackedStructSlice,
    G: PackedStructSlice,
    H: PackedStructSlice
[src]

impl<A, B, C, D, E, F, G> PackedStructSlice for (A, B, C, D, E, F, G) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice,
    F: PackedStructSlice,
    G: PackedStructSlice
[src]

impl<A, B, C, D, E, F> PackedStructSlice for (A, B, C, D, E, F) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice,
    F: PackedStructSlice
[src]

impl<A, B, C, D, E> PackedStructSlice for (A, B, C, D, E) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice,
    E: PackedStructSlice
[src]

impl<A, B, C, D> PackedStructSlice for (A, B, C, D) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice,
    D: PackedStructSlice
[src]

impl<A, B, C> PackedStructSlice for (A, B, C) where
    A: PackedStructSlice,
    B: PackedStructSlice,
    C: PackedStructSlice
[src]

impl<A, B> PackedStructSlice for (A, B) where
    A: PackedStructSlice,
    B: PackedStructSlice
[src]

impl<A> PackedStructSlice for (A,) where
    A: PackedStructSlice
[src]

impl<T> PackedStructSlice for Vec<T> where
    T: PackedStructSlice
[src]

This can only be used as a vector of structures that have a statically known size

Loading content...

Implementors

impl<T> PackedStructSlice for T where
    T: PackedStruct,
    T::ByteArray: ByteArray
[src]

Slice unpacking for byte arrays

Loading content...