pub struct EncryptedBlockStorageMapping { /* private fields */ }Implementations§
Source§impl EncryptedBlockStorageMapping
impl EncryptedBlockStorageMapping
Sourcepub async fn load_mapping<S>(
&self,
storage: &EncryptedBlockStorage<S>,
map: &Cid,
) -> Result<(), StorageError>
pub async fn load_mapping<S>( &self, storage: &EncryptedBlockStorage<S>, map: &Cid, ) -> Result<(), StorageError>
Load mapping from CID. This will add the mappings to the existing.
Sourcepub async fn set_mapping(&mut self, mapping: BlockMapping)
pub async fn set_mapping(&mut self, mapping: BlockMapping)
Replace the mapping.
pub async fn clear(&self)
pub async fn get(&self, key: &Cid) -> Option<Cid>
pub async fn remove(&self, key: &Cid) -> Option<Cid>
Sourcepub async fn get_mapping(
&self,
keys: impl IntoIterator<Item = Cid>,
) -> BTreeMap<Cid, Option<Cid>>
pub async fn get_mapping( &self, keys: impl IntoIterator<Item = Cid>, ) -> BTreeMap<Cid, Option<Cid>>
Map multiple Cids into an Map.
pub async fn get_first_by_value(&self, key: &Cid) -> Option<Cid>
pub async fn insert(&self, key: Cid, value: Cid) -> Option<Cid>
pub async fn extend(&self, items: impl IntoIterator<Item = MappedCid>)
pub async fn to_blocks<S>( &self, serializer: S, options: WriteOptions, ) -> Result<(Option<Cid>, Vec<Block>), StorageError>
Trait Implementations§
Source§impl BlockStorageContentMapping for EncryptedBlockStorageMapping
impl BlockStorageContentMapping for EncryptedBlockStorageMapping
Source§fn to_plain<'life0, 'life1, 'async_trait>(
&'life0 self,
mapped: &'life1 Cid,
) -> Pin<Box<dyn Future<Output = Option<Cid>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn to_plain<'life0, 'life1, 'async_trait>(
&'life0 self,
mapped: &'life1 Cid,
) -> Pin<Box<dyn Future<Output = Option<Cid>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn to_mapped<'life0, 'life1, 'async_trait>(
&'life0 self,
plain: &'life1 Cid,
) -> Pin<Box<dyn Future<Output = Option<Cid>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn to_mapped<'life0, 'life1, 'async_trait>(
&'life0 self,
plain: &'life1 Cid,
) -> Pin<Box<dyn Future<Output = Option<Cid>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Clone for EncryptedBlockStorageMapping
impl Clone for EncryptedBlockStorageMapping
Source§fn clone(&self) -> EncryptedBlockStorageMapping
fn clone(&self) -> EncryptedBlockStorageMapping
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptedBlockStorageMapping
impl Debug for EncryptedBlockStorageMapping
Source§impl Default for EncryptedBlockStorageMapping
impl Default for EncryptedBlockStorageMapping
Source§fn default() -> EncryptedBlockStorageMapping
fn default() -> EncryptedBlockStorageMapping
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncryptedBlockStorageMapping
impl RefUnwindSafe for EncryptedBlockStorageMapping
impl Send for EncryptedBlockStorageMapping
impl Sync for EncryptedBlockStorageMapping
impl Unpin for EncryptedBlockStorageMapping
impl UnsafeUnpin for EncryptedBlockStorageMapping
impl UnwindSafe for EncryptedBlockStorageMapping
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more