[][src]Trait ipfs::repo::PinStore

pub trait PinStore: Debug + Send + Sync + Unpin + 'static {
#[must_use]    fn is_pinned<'life0, 'life1, 'async_trait>(
        &'life0 self,
        block: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn insert_direct_pin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn insert_recursive_pin<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid,
        referenced: BoxStream<'life2, Result<Cid, IpldRefsError>>
    ) -> 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_direct_pin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn remove_recursive_pin<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid,
        referenced: BoxStream<'life2, Result<Cid, IpldRefsError>>
    ) -> 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 list<'life0, 'async_trait>(
        &'life0 self,
        mode: Option<PinMode>
    ) -> Pin<Box<dyn Future<Output = BoxStream<'static, Result<(Cid, PinMode), Error>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn query<'life0, 'async_trait>(
        &'life0 self,
        ids: Vec<Cid>,
        requirement: Option<PinMode>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(Cid, PinKind<Cid>)>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required methods

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

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

#[must_use]fn insert_recursive_pin<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    target: &'life1 Cid,
    referenced: BoxStream<'life2, Result<Cid, IpldRefsError>>
) -> 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_direct_pin<'life0, 'life1, 'async_trait>(
    &'life0 self,
    target: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn remove_recursive_pin<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    target: &'life1 Cid,
    referenced: BoxStream<'life2, Result<Cid, IpldRefsError>>
) -> 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 list<'life0, 'async_trait>(
    &'life0 self,
    mode: Option<PinMode>
) -> Pin<Box<dyn Future<Output = BoxStream<'static, Result<(Cid, PinMode), Error>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn query<'life0, 'async_trait>(
    &'life0 self,
    ids: Vec<Cid>,
    requirement: Option<PinMode>
) -> Pin<Box<dyn Future<Output = Result<Vec<(Cid, PinKind<Cid>)>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Returns error if any of the ids isn't pinned in the required type, otherwise returns the pin details if all of the cids are pinned in one way or the another.

Loading content...

Implementors

impl PinStore for FsDataStore[src]

impl PinStore for MemDataStore[src]

Loading content...