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§
Sourcefn create_reader<'a>(&'a mut self) -> impl BufferReader + 'a
fn create_reader<'a>(&'a mut self) -> impl BufferReader + 'a
Creates a reader to read from the buffer
Sourcefn create_writer<'a>(&'a mut self) -> impl BufferWriter + 'a
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.