Trait cyfs_lib::NOCStorage

source ·
pub trait NOCStorage: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn load<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Option<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn save<'life0, 'async_trait>(
        &'life0 self,
        buf: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn id(&self) -> &str

source

fn load<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<Option<Vec<u8>>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn save<'life0, 'async_trait>( &'life0 self, buf: Vec<u8> ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn delete<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§