Skip to main content

WriteBuffer

Trait WriteBuffer 

Source
pub trait WriteBuffer: DerefMut<Target = [u8]> {
    type Error;

    // Required methods
    fn alloc(&mut self) -> Result<(), Self::Error>;
    fn write_all(&mut self, count: usize) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn alloc(&mut self) -> Result<(), Self::Error>

Allocate some fixed amount of bytes in the buffer.

Source

fn write_all(&mut self, count: usize) -> Result<(), Self::Error>

Send exactly count bytes from buffer. Remaining bytes are discarded.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§