Skip to main content

WriteBytes

Trait WriteBytes 

Source
pub trait WriteBytes {
    type Error;

    // Required method
    fn write_all(&mut self, bytes: &[u8]) -> Result<(), Self::Error>;
}
Expand description

A trait for writing bytes, usable in no_std environments.

This replaces std::io::Write for the columnar encoding functions. Implementations exist for Vec<u8> (always) and std::io::Write (with the std feature).

Required Associated Types§

Source

type Error

The error type returned by write operations.

Required Methods§

Source

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

Write all bytes from the slice, or return an error.

Implementors§

Source§

impl<W: Write> WriteBytes for W

Available on crate feature std only.