Trait ReadWrite

Source
pub trait ReadWrite {
    // Required methods
    fn create_reader<'a>(&'a mut self) -> impl BufferReader + 'a;
    fn create_writer<'a>(&'a mut self) -> impl BufferWriter + 'a;
}
Expand description

Trait that allows to create a reader and a writer for a buffer. See BufferReader adn BufferWriter

Required Methods§

Source

fn create_reader<'a>(&'a mut self) -> impl BufferReader + 'a

Creates a reader to read from the buffer

Source

fn create_writer<'a>(&'a mut self) -> impl BufferWriter + 'a

Creates a writer to write to the buffer

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> ReadWrite for Buffer<T>