Struct mls_rs::storage_provider::sqlite::storage::SqLiteKeyPackageStorage
source · 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.
pub fn delete_expired(&self) -> Result<(), SqLiteDataStorageError>
pub fn delete_expired_by_time( &self, time: u64, ) -> Result<(), SqLiteDataStorageError>
pub fn count(&self) -> Result<usize, SqLiteDataStorageError>
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
§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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