pub struct SqLiteKeyPackageStorage { /* private fields */ }Available on crate feature 
sqlite only.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 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 SqLiteKeyPackageStorage
 
impl Debug for SqLiteKeyPackageStorage
Source§impl KeyPackageStorage for SqLiteKeyPackageStorage
 
impl KeyPackageStorage for SqLiteKeyPackageStorage
Source§type Error = SqLiteDataStorageError
 
type Error = SqLiteDataStorageError
Error type that the underlying storage mechanism returns on internal
failure.
Source§fn insert(
    &mut self,
    id: Vec<u8>,
    pkg: KeyPackageData,
) -> Result<(), <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
 
fn insert( &mut self, id: Vec<u8>, pkg: KeyPackageData, ) -> Result<(), <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
Source§fn get(
    &self,
    id: &[u8],
) -> Result<Option<KeyPackageData>, <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
 
fn get( &self, id: &[u8], ) -> Result<Option<KeyPackageData>, <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
Source§fn delete(
    &mut self,
    id: &[u8],
) -> Result<(), <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
 
fn delete( &mut self, id: &[u8], ) -> Result<(), <SqLiteKeyPackageStorage as KeyPackageStorage>::Error>
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