Skip to main content

BinaryWrite

Trait BinaryWrite 

Source
pub trait BinaryWrite {
    // Required method
    fn write_buffer(&mut self, buffer: &[u8]) -> Result<usize, ()>;
}
Expand description

Interface for writing an arbitrary buffer.

Required Methods§

Source

fn write_buffer(&mut self, buffer: &[u8]) -> Result<usize, ()>

Write the buffer to some underlying print mechanism.

Returns Ok(usize) on success with the number of bytes from buffer that were written. Returns Err(()) on any error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§