Write

Trait Write 

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

Minimal write abstraction used by this crate in both std and no‑std modes.

Required Methods§

Source

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

Writes the entire buf into the underlying sink when possible and returns the number of bytes written.

Source

fn flush(&mut self) -> Result<()>

Flushes any internal buffers, if applicable.

Implementations on Foreign Types§

Source§

impl Write for Vec<u8>

Available on non-crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Implementors§

Source§

impl<T: AsMut<[u8]>> Write for Cursor<T>