[][src]Trait bee_storage::access::Fetch

pub trait Fetch<K, V>: StorageBackend {
#[must_use]    pub fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 K
    ) -> Pin<Box<dyn Future<Output = Result<Option<V>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Fetch<K, V> trait extends the StorageBackend with fetch operation for the (key: K, value: V pair); therefore, it should be explicitly implemented for the corresponding StorageBackend.

Required methods

#[must_use]pub fn fetch<'life0, 'life1, 'async_trait>(
    &'life0 self,
    key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<Option<V>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Fetches the value associated with the key from the storage.

Loading content...

Implementors

Loading content...