Struct mls_rs::storage_provider::sqlite::storage::SqLiteGroupStateStorage
source · pub struct SqLiteGroupStateStorage { /* private fields */ }
Available on crate feature
sqlite
only.Expand description
SQLite Storage for MLS group states.
Implementations§
source§impl SqLiteGroupStateStorage
impl SqLiteGroupStateStorage
pub fn with_max_epoch_retention( self, max_epoch_retention: u64 ) -> SqLiteGroupStateStorage
sourcepub fn group_ids(&self) -> Result<Vec<Vec<u8>>, SqLiteDataStorageError>
pub fn group_ids(&self) -> Result<Vec<Vec<u8>>, SqLiteDataStorageError>
List all the group ids for groups that are stored.
sourcepub fn delete_group(
&self,
group_id: &[u8]
) -> Result<(), SqLiteDataStorageError>
pub fn delete_group( &self, group_id: &[u8] ) -> Result<(), SqLiteDataStorageError>
Delete a group from storage.
pub fn max_epoch_retention(&self) -> u64
Trait Implementations§
source§impl Clone for SqLiteGroupStateStorage
impl Clone for SqLiteGroupStateStorage
source§fn clone(&self) -> SqLiteGroupStateStorage
fn clone(&self) -> SqLiteGroupStateStorage
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 SqLiteGroupStateStorage
impl Debug for SqLiteGroupStateStorage
source§impl GroupStateStorage for SqLiteGroupStateStorage
impl GroupStateStorage for SqLiteGroupStateStorage
type Error = SqLiteDataStorageError
source§fn write<ST, ET>(
&mut self,
state: ST,
epoch_inserts: Vec<ET>,
epoch_updates: Vec<ET>
) -> Result<(), <SqLiteGroupStateStorage as GroupStateStorage>::Error>where
ST: GroupState + MlsEncode + MlsDecode + Send + Sync,
ET: EpochRecord + MlsEncode + MlsDecode + Send + Sync,
fn write<ST, ET>(
&mut self,
state: ST,
epoch_inserts: Vec<ET>,
epoch_updates: Vec<ET>
) -> Result<(), <SqLiteGroupStateStorage as GroupStateStorage>::Error>where
ST: GroupState + MlsEncode + MlsDecode + Send + Sync,
ET: EpochRecord + MlsEncode + MlsDecode + Send + Sync,
Write pending state updates. Read more
source§fn state<T>(
&self,
group_id: &[u8]
) -> Result<Option<T>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
fn state<T>( &self, group_id: &[u8] ) -> Result<Option<T>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
Fetch a group state from storage.
source§fn max_epoch_id(
&self,
group_id: &[u8]
) -> Result<Option<u64>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
fn max_epoch_id( &self, group_id: &[u8] ) -> Result<Option<u64>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
The
EpochRecord::id
value that is associated with a stored
prior epoch for a particular group.source§fn epoch<T>(
&self,
group_id: &[u8],
epoch_id: u64
) -> Result<Option<T>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
fn epoch<T>( &self, group_id: &[u8], epoch_id: u64 ) -> Result<Option<T>, <SqLiteGroupStateStorage as GroupStateStorage>::Error>
Lazy load cached epoch data from a particular group.
Auto Trait Implementations§
impl RefUnwindSafe for SqLiteGroupStateStorage
impl Send for SqLiteGroupStateStorage
impl Sync for SqLiteGroupStateStorage
impl Unpin for SqLiteGroupStateStorage
impl UnwindSafe for SqLiteGroupStateStorage
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