Trait rust_ipfs::repo::PinStore

source ·
pub trait PinStore: Debug + Send + Sync + Unpin + 'static {
    fn is_pinned<'life0, 'life1, 'async_trait>(
        &'life0 self,
        block: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn insert_direct_pin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; 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
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn remove_direct_pin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 Cid
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; 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
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; 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
        Self: 'async_trait,
        'life0: 'async_trait
; 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
        Self: 'async_trait,
        'life0: 'async_trait
; }

Required Methods§

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.

Implementors§