Skip to main content

Buffer

Trait Buffer 

Source
pub trait Buffer:
    AsRef<[u8]>
    + AsMut<[u8]>
    + Send {
    // Required method
    fn put(&mut self, data: &[u8]);
}
Expand description

Abstraction over a contiguous in-memory byte buffer that supports appending.

Required Methods§

Source

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

Appends data to the end of the buffer.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Buffer for Vec<u8>

Source§

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

Implementors§