pub trait Storage<T>where
Self: Sized,{
// Required methods
fn buffer_mut(&mut self) -> &mut Vec<T>;
fn flush(&mut self) -> Result<(), Box<dyn Error>>;
// Provided methods
fn add(&mut self, item: T) -> Result<(), Box<dyn Error>> { ... }
fn finish(self) -> Result<(), Box<dyn Error>> { ... }
}Required Methods§
Sourcefn buffer_mut(&mut self) -> &mut Vec<T>
fn buffer_mut(&mut self) -> &mut Vec<T>
Returns a mutable reference to the internal buffer
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".