pub struct InMemoryKeyPackageStorage { /* private fields */ }
Expand description
In memory key package storage backed by a HashMap.
All clones of an instance of this type share the same underlying HashMap.
Implementations§
source§impl InMemoryKeyPackageStorage
impl InMemoryKeyPackageStorage
sourcepub fn insert(&self, id: Vec<u8>, pkg: KeyPackageData)
pub fn insert(&self, id: Vec<u8>, pkg: KeyPackageData)
Insert key package data.
sourcepub fn get(&self, id: &[u8]) -> Option<KeyPackageData>
pub fn get(&self, id: &[u8]) -> Option<KeyPackageData>
Get a key package data by id
.
sourcepub fn key_packages(&self) -> Vec<(Vec<u8>, KeyPackageData)>
pub fn key_packages(&self) -> Vec<(Vec<u8>, KeyPackageData)>
Get all key packages that are currently stored.
Trait Implementations§
source§impl Clone for InMemoryKeyPackageStorage
impl Clone for InMemoryKeyPackageStorage
source§fn clone(&self) -> InMemoryKeyPackageStorage
fn clone(&self) -> InMemoryKeyPackageStorage
Returns a copy 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 InMemoryKeyPackageStorage
impl Debug for InMemoryKeyPackageStorage
source§impl Default for InMemoryKeyPackageStorage
impl Default for InMemoryKeyPackageStorage
source§fn default() -> InMemoryKeyPackageStorage
fn default() -> InMemoryKeyPackageStorage
Returns the “default value” for a type. Read more
source§impl KeyPackageStorage for InMemoryKeyPackageStorage
impl KeyPackageStorage for InMemoryKeyPackageStorage
§type Error = Infallible
type Error = Infallible
Error type that the underlying storage mechanism returns on internal
failure.
Auto Trait Implementations§
impl RefUnwindSafe for InMemoryKeyPackageStorage
impl Send for InMemoryKeyPackageStorage
impl Sync for InMemoryKeyPackageStorage
impl Unpin for InMemoryKeyPackageStorage
impl UnwindSafe for InMemoryKeyPackageStorage
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