Trait BftWriter

Source
pub trait BftWriter: Send + Clone {
    // Required method
    fn write<'life0, 'async_trait>(
        &'life0 mut self,
        key: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A BftWriter allows to write a key-value pair to a node. It must be Clone because writes to a single node are scheduled at regular intervals, without waiting for previous writes to terminate, thus, writes to the same node can happen concurrently. The framework avoids locking as much as possible and requires thus cloneability. The binding is however free to implement cloneability with locking, i.e., with std::sync::Arc and a mutex.

Required Methods§

Source

fn write<'life0, 'async_trait>( &'life0 mut self, key: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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§