[][src]Struct ipfs_sqlite_block_store::async_block_store::AsyncBlockStore

pub struct AsyncBlockStore<R> { /* fields omitted */ }

Implementations

impl<R: RuntimeAdapter> AsyncBlockStore<R>[src]

pub fn new(runtime: R, inner: BlockStore) -> Self[src]

Wrap a block store in an asyc wrapper

runtime A runtime adapter for your runtime of choice inner The BlockStore to wrap

pub async fn temp_pin<'_>(&'_ self) -> AsyncTempPin[src]

pub async fn alias<'_>(&'_ self, name: Vec<u8>, link: Option<Cid>) -> Result<()>[src]

pub async fn gc<'_>(&'_ self) -> Result<()>[src]

pub async fn incremental_gc<'_>(
    &'_ self,
    min_blocks: usize,
    max_duration: Duration
) -> Result<bool>
[src]

pub async fn incremental_delete_orphaned<'_>(
    &'_ self,
    min_blocks: usize,
    max_duration: Duration
) -> Result<bool>
[src]

pub async fn get_block<'_>(&'_ self, cid: Cid) -> Result<Option<Vec<u8>>>[src]

pub async fn has_block<'_>(&'_ self, cid: Cid) -> Result<bool>[src]

pub async fn has_cid<'_>(&'_ self, cid: Cid) -> Result<bool>[src]

pub async fn get_missing_blocks<C: FromIterator<Cid> + Send + 'static, '_>(
    &'_ self,
    cid: Cid
) -> Result<C>
[src]

pub async fn get_descendants<C: FromIterator<Cid> + Send + 'static, '_>(
    &'_ self,
    cid: Cid
) -> Result<C>
[src]

pub async fn reverse_alias<'_>(&'_ self, cid: Cid) -> Result<Vec<Vec<u8>>>[src]

pub async fn get_known_cids<C: FromIterator<Cid> + Send + 'static, '_>(
    &'_ self
) -> Result<C>
[src]

pub async fn get_block_cids<C: FromIterator<Cid> + Send + 'static, '_>(
    &'_ self
) -> Result<C>
[src]

pub async fn get_store_stats<'_>(&'_ self) -> Result<StoreStats>[src]

pub async fn add_blocks<B: Block + Send + 'static, '_>(
    &'_ self,
    blocks: Vec<B>,
    alias: Option<AsyncTempPin>
) -> Result<()>
[src]

pub async fn add_block<'_>(
    &'_ self,
    cid: Cid,
    data: Vec<u8>,
    links: Vec<Cid>,
    alias: Option<AsyncTempPin>
) -> Result<()>
[src]

pub async fn gc_loop(self, config: GcConfig) -> Result<()>[src]

A gc loop that runs incremental gc in regular intervals

Gc will run as long as this future is polled. GC is a two step process. First, the metadata of expendable non-pinned blocks will be deleted, then the actual data will be removed. This will run the first step and the second step interleaved to minimize gc interruptions.

Trait Implementations

impl<R: Clone> Clone for AsyncBlockStore<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for AsyncBlockStore<R> where
    R: RefUnwindSafe

impl<R> Send for AsyncBlockStore<R> where
    R: Send

impl<R> Sync for AsyncBlockStore<R> where
    R: Sync

impl<R> Unpin for AsyncBlockStore<R> where
    R: Unpin

impl<R> UnwindSafe for AsyncBlockStore<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> References<RawCodec> for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.