Skip to main content

Writer

Trait Writer 

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

    // Provided methods
    fn write_len(&mut self, buf: &[u8], len: &mut usize) { ... }
    fn write_chunked(&mut self, buf: &[u8], _chunk_len: usize) { ... }
}

Required Methods§

Source

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

Provided Methods§

Source

fn write_len(&mut self, buf: &[u8], len: &mut usize)

Source

fn write_chunked(&mut self, buf: &[u8], _chunk_len: usize)

Writes buf as if it had been split into chunk_len sized pieces, each passed to Writer::write in turn. Writers whose output only depends on the concatenation of what they receive take the default implementation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Writer for &mut Vec<u8>

Source§

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

Source§

impl Writer for Context

Source§

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

Source§

impl Writer for Vec<u8>

Source§

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

Implementors§