[−][src]Struct ipfs_sqlite_block_store::async_block_store::AsyncBlockStore
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]
&'_ self,
min_blocks: usize,
max_duration: Duration
) -> Result<bool>
pub async fn incremental_delete_orphaned<'_>(
&'_ self,
min_blocks: usize,
max_duration: Duration
) -> Result<bool>
[src]
&'_ self,
min_blocks: usize,
max_duration: Duration
) -> Result<bool>
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]
&'_ self,
cid: Cid
) -> Result<C>
pub async fn get_descendants<C: FromIterator<Cid> + Send + 'static, '_>(
&'_ self,
cid: Cid
) -> Result<C>
[src]
&'_ self,
cid: Cid
) -> Result<C>
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]
&'_ self
) -> Result<C>
pub async fn get_block_cids<C: FromIterator<Cid> + Send + 'static, '_>(
&'_ self
) -> Result<C>
[src]
&'_ self
) -> Result<C>
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]
&'_ self,
blocks: Vec<B>,
alias: Option<AsyncTempPin>
) -> Result<()>
pub async fn add_block<'_>(
&'_ self,
cid: Cid,
data: Vec<u8>,
links: Vec<Cid>,
alias: Option<AsyncTempPin>
) -> Result<()>
[src]
&'_ self,
cid: Cid,
data: Vec<u8>,
links: Vec<Cid>,
alias: Option<AsyncTempPin>
) -> Result<()>
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]
pub fn clone(&self) -> AsyncBlockStore<R>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for AsyncBlockStore<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for AsyncBlockStore<R> where
R: Send,
R: Send,
impl<R> Sync for AsyncBlockStore<R> where
R: Sync,
R: Sync,
impl<R> Unpin for AsyncBlockStore<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for AsyncBlockStore<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> References<RawCodec> for T
pub fn references<R, E>(
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
R: Read,
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
R: Read,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,