Skip to main content

BinaryWrite

Trait BinaryWrite 

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

A minimal binary write trait that works in both std and no_std environments.

This trait provides a simple interface for writing bytes, similar to std::io::Write, but without requiring the standard library.

Required Methods§

Source

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

Writes all bytes from the buffer to the writer.

This method must write the entire buffer 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> BinaryWrite for W