Storage

Trait Storage 

Source
pub trait Storage:
    KeyString
    + KeyList
    + Send
    + Sync {
    // Required method
    fn clock<'life0, 'async_trait>(
        &'life0 self,
        at_least: u64,
    ) -> Pin<Box<dyn Future<Output = TribResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait representing a storage interface The trait bounds for KeyString and KeyList respectively represent the functions requires for the single key-value and key-list parts of the storage interface.

Required Methods§

Source

fn clock<'life0, 'async_trait>( &'life0 self, at_least: u64, ) -> Pin<Box<dyn Future<Output = TribResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns an auto-incrementing clock. The returned value of each call will be unique, no smaller than at_least, and strictly larger than the value returned last time, unless it was u64::MAX

Implementors§