Struct rust_ipfs::repo::blockstore::flatfs::FsBlockStore
source · pub struct FsBlockStore { /* private fields */ }
Expand description
File system backed block store.
For information on path mangling, please see block_path
and filestem_to_block_cid
.
Implementations§
Trait Implementations§
source§impl BlockStore for FsBlockStore
impl BlockStore for FsBlockStore
fn init<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn open<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
FIXME: redundant and never called during initialization, which is expected to happen during [
init
].source§fn contains<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn contains<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns whether a block is present in the blockstore.
source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Option<Block>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Option<Block>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a block from the blockstore.
source§fn size<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 [Cid]
) -> Pin<Box<dyn Future<Output = Result<Option<usize>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn size<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 [Cid]
) -> Pin<Box<dyn Future<Output = Result<Option<usize>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the size of a single block
source§fn total_size<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn total_size<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a total size of the block store
source§fn put<'life0, 'async_trait>(
&'life0 self,
block: Block
) -> Pin<Box<dyn Future<Output = Result<(Cid, BlockPut), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
block: Block
) -> Pin<Box<dyn Future<Output = Result<(Cid, BlockPut), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts a block in the blockstore.
source§fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Result<BlockRm, BlockRmError>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Result<BlockRm, BlockRmError>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes a block from the blockstore.
source§fn remove_garbage<'life0, 'async_trait>(
&'life0 self,
references: BoxStream<'static, Cid>
) -> Pin<Box<dyn Future<Output = Result<Vec<Cid>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_garbage<'life0, 'async_trait>(
&'life0 self,
references: BoxStream<'static, Cid>
) -> Pin<Box<dyn Future<Output = Result<Vec<Cid>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove blocks while excluding references from the cleanup
Auto Trait Implementations§
impl !RefUnwindSafe for FsBlockStore
impl Send for FsBlockStore
impl Sync for FsBlockStore
impl Unpin for FsBlockStore
impl !UnwindSafe for FsBlockStore
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more