pub struct SqLiteKeyPackageStorage { /* private fields */ }
Expand description
SQLite storage for MLS Key Packages.
Implementations§
Source§impl SqLiteKeyPackageStorage
impl SqLiteKeyPackageStorage
Sourcepub fn delete(&self, id: &[u8]) -> Result<(), SqLiteDataStorageError>
pub fn delete(&self, id: &[u8]) -> Result<(), SqLiteDataStorageError>
Delete a specific key package from storage based on it’s id.
Sourcepub fn delete_expired(&self) -> Result<(), SqLiteDataStorageError>
pub fn delete_expired(&self) -> Result<(), SqLiteDataStorageError>
Delete key packages that are expired based on the current system clock time.
Sourcepub fn delete_expired_by_time(
&self,
time: u64,
) -> Result<(), SqLiteDataStorageError>
pub fn delete_expired_by_time( &self, time: u64, ) -> Result<(), SqLiteDataStorageError>
Delete key packages that are expired based on an application provided time in seconds since unix epoch.
Sourcepub fn count(&self) -> Result<usize, SqLiteDataStorageError>
pub fn count(&self) -> Result<usize, SqLiteDataStorageError>
Total number of key packages held in storage.
Sourcepub fn count_at_time(&self, time: u64) -> Result<usize, SqLiteDataStorageError>
pub fn count_at_time(&self, time: u64) -> Result<usize, SqLiteDataStorageError>
Total number of key packages that will still remain in storage at a specific application provided time in seconds since unix epoch. This assumes that the application would also be calling SqLiteKeyPackageStorage::delete_expired at a reasonable cadence to be accurate.
Trait Implementations§
Source§impl Clone for SqLiteKeyPackageStorage
impl Clone for SqLiteKeyPackageStorage
Source§fn clone(&self) -> SqLiteKeyPackageStorage
fn clone(&self) -> SqLiteKeyPackageStorage
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 SqLiteKeyPackageStorage
impl Debug for SqLiteKeyPackageStorage
Source§impl KeyPackageStorage for SqLiteKeyPackageStorage
impl KeyPackageStorage for SqLiteKeyPackageStorage
Auto Trait Implementations§
impl Freeze for SqLiteKeyPackageStorage
impl RefUnwindSafe for SqLiteKeyPackageStorage
impl Send for SqLiteKeyPackageStorage
impl Sync for SqLiteKeyPackageStorage
impl Unpin for SqLiteKeyPackageStorage
impl UnwindSafe for SqLiteKeyPackageStorage
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> 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