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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W: Write> WriteBytes for W

Available on crate feature std only.