[][src]Trait ipfs::repo::DataStore

pub trait DataStore: PinStore + Debug + Send + Sync + Unpin + 'static {
    fn new(path: PathBuf) -> Self;
#[must_use] fn init<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn open<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn contains<'life0, 'life1, 'async_trait>(
        &'life0 self,
        col: Column,
        key: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        col: Column,
        key: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn put<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        col: Column,
        key: &'life1 [u8],
        value: &'life2 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        col: Column,
        key: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn wipe<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required methods

fn new(path: PathBuf) -> Self

#[must_use]fn init<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn open<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn contains<'life0, 'life1, 'async_trait>(
    &'life0 self,
    col: Column,
    key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn get<'life0, 'life1, 'async_trait>(
    &'life0 self,
    col: Column,
    key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn put<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    col: Column,
    key: &'life1 [u8],
    value: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn remove<'life0, 'life1, 'async_trait>(
    &'life0 self,
    col: Column,
    key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn wipe<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl DataStore for FsDataStore[src]

The column operations are all unimplemented pending at least downscoping of the DataStore trait itself.

impl DataStore for MemDataStore[src]

Loading content...