Skip to main content

LayerWriter

Trait LayerWriter 

Source
pub trait LayerWriter<K, V>: Sized
where K: Debug + Send + Versioned + Sync, V: Debug + Send + Versioned + Sync,
{ // Required methods fn write( &mut self, item: ItemRef<'_, K, V>, ) -> impl Future<Output = Result<(), Error>> + Send; fn complete(self) -> impl Future<Output = Result<u64, Error>> + Send; }
Expand description

Trait for writing new layers.

Required Methods§

Source

fn write( &mut self, item: ItemRef<'_, K, V>, ) -> impl Future<Output = Result<(), Error>> + Send

Writes the given item to this layer.

Source

fn complete(self) -> impl Future<Output = Result<u64, Error>> + Send

Flushes any buffered items to the backing storage. The total number of bytes written is returned.

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§