pub trait Packer {
    type Error;

    fn pack_bytes<B: AsRef<[u8]>>(
        &mut self,
        bytes: B
    ) -> Result<(), Self::Error>; }
Expand description

A type that can pack any value that implements Packable.

Required Associated Types

An error type representing any error related to writing bytes.

Required Methods

Writes a sequence of bytes into the Packer. The totality of bytes must be written into the packer. This method must fail if the packer does not have enough space to fulfill the request.

Implementations on Foreign Types

Implementors