Trait Output

Source
pub trait Output: Sized {
    // Required method
    fn write(&mut self, bytes: &[u8]);

    // Provided method
    fn push_byte(&mut self, byte: u8) { ... }
}
Expand description

Trait that allows writing of data.

Required Methods§

Source

fn write(&mut self, bytes: &[u8])

Write to the output.

Provided Methods§

Source

fn push_byte(&mut self, byte: u8)

Write a single byte to the output.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W: Write> Output for W