pub trait PackableExt: Packable {
    fn packed_len(&self) -> usize;
    fn pack_to_vec(&self) -> Vec<u8>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn unpack_verified<T: AsRef<[u8]>>(
        bytes: T
    ) -> Result<Self, UnpackError<<Self as Packable>::UnpackError, UnexpectedEOF>>; fn unpack_unverified<T: AsRef<[u8]>>(
        bytes: T
    ) -> Result<Self, UnpackError<<Self as Packable>::UnpackError, UnexpectedEOF>>; }
Expand description

Extension trait for types that implement Packable.

Required Methods

Returns the length in bytes of the value after being packed. The returned value always matches the number of bytes written using pack.

Convenience method that packs this value into a Vec<u8>.

Unpacks this value from a sequence of bytes doing syntactical checks.

Unpacks this value from a sequence of bytes without doing syntactical checks.

Implementors