pub struct InMemoryGroupStateStorage { /* private fields */ }
Expand description
In memory group state storage backed by a HashMap.
All clones of an instance of this type share the same underlying HashMap.
Implementations§
source§impl InMemoryGroupStateStorage
impl InMemoryGroupStateStorage
pub fn with_max_epoch_retention( self, max_epoch_retention: usize ) -> Result<Self, MlsError>
sourcepub fn stored_groups(&self) -> Vec<Vec<u8>>
pub fn stored_groups(&self) -> Vec<Vec<u8>>
Get the set of unique group ids that have data stored.
sourcepub fn delete_group(&self, group_id: &[u8])
pub fn delete_group(&self, group_id: &[u8])
Delete all data corresponding to group_id
.
Trait Implementations§
source§impl Clone for InMemoryGroupStateStorage
impl Clone for InMemoryGroupStateStorage
source§fn clone(&self) -> InMemoryGroupStateStorage
fn clone(&self) -> InMemoryGroupStateStorage
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 InMemoryGroupStateStorage
impl Debug for InMemoryGroupStateStorage
source§impl Default for InMemoryGroupStateStorage
impl Default for InMemoryGroupStateStorage
source§impl GroupStateStorage for InMemoryGroupStateStorage
impl GroupStateStorage for InMemoryGroupStateStorage
type Error = Error
source§fn max_epoch_id(&self, group_id: &[u8]) -> Result<Option<u64>, Self::Error>
fn max_epoch_id(&self, group_id: &[u8]) -> Result<Option<u64>, Self::Error>
The
EpochRecord::id
value that is associated with a stored
prior epoch for a particular group.source§fn state<T>(&self, group_id: &[u8]) -> Result<Option<T>, Self::Error>where
T: GroupState + MlsDecode,
fn state<T>(&self, group_id: &[u8]) -> Result<Option<T>, Self::Error>where
T: GroupState + MlsDecode,
Fetch a group state from storage.
Auto Trait Implementations§
impl RefUnwindSafe for InMemoryGroupStateStorage
impl Send for InMemoryGroupStateStorage
impl Sync for InMemoryGroupStateStorage
impl Unpin for InMemoryGroupStateStorage
impl UnwindSafe for InMemoryGroupStateStorage
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