pub trait Writer {
    type Error: Error;

    fn write_bytes(&mut self, bytes: &[u8]) -> Result<(), Self::Error>;

    fn write_byte(&mut self, b: u8) -> Result<(), Self::Error> { ... }
    fn write_array<const N: usize>(
        &mut self,
        array: [u8; N]
    ) -> Result<(), Self::Error> { ... } }
Expand description

The trait governing how a writer works.

Required Associated Types

The error type raised by the writer.

Required Methods

Write bytes to the current writer.

Provided Methods

Write a single byte.

Write an array to the current writer.

Implementations on Foreign Types

Implementors