Skip to main content

Write

Trait Write 

Source
pub trait Write {
    // Required method
    fn write(&mut self, buf: &[u8]) -> Result<usize>;

    // Provided method
    fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
}

Required Methods§

Source

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

Provided Methods§

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Write for Vec<u8>

Source§

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

Implementors§