pub struct InMemKyberPreKeyStore { /* private fields */ }Expand description
Basic implementation of traits::KyberPreKeyStore.
Note that this implementation does not clear any keys upon use! This is correct for last-resort keys, but a real client would normally have a set of one-time keys to use first.
Implementations§
Source§impl InMemKyberPreKeyStore
 
impl InMemKyberPreKeyStore
Sourcepub fn all_kyber_pre_key_ids(&self) -> impl Iterator<Item = &KyberPreKeyId>
 
pub fn all_kyber_pre_key_ids(&self) -> impl Iterator<Item = &KyberPreKeyId>
Returns all registered Kyber pre-key ids
Trait Implementations§
Source§impl Clone for InMemKyberPreKeyStore
 
impl Clone for InMemKyberPreKeyStore
Source§fn clone(&self) -> InMemKyberPreKeyStore
 
fn clone(&self) -> InMemKyberPreKeyStore
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 Default for InMemKyberPreKeyStore
 
impl Default for InMemKyberPreKeyStore
Source§impl KyberPreKeyStore for InMemKyberPreKeyStore
 
impl KyberPreKeyStore for InMemKyberPreKeyStore
Source§fn get_kyber_pre_key<'life0, 'async_trait>(
    &'life0 self,
    kyber_prekey_id: KyberPreKeyId,
) -> Pin<Box<dyn Future<Output = Result<KyberPreKeyRecord>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn get_kyber_pre_key<'life0, 'async_trait>(
    &'life0 self,
    kyber_prekey_id: KyberPreKeyId,
) -> Pin<Box<dyn Future<Output = Result<KyberPreKeyRecord>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Look up the signed kyber pre-key corresponding to 
kyber_prekey_id.Source§fn save_kyber_pre_key<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    kyber_prekey_id: KyberPreKeyId,
    record: &'life1 KyberPreKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
 
fn save_kyber_pre_key<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    kyber_prekey_id: KyberPreKeyId,
    record: &'life1 KyberPreKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Set the entry for 
kyber_prekey_id to the value of record.Source§fn mark_kyber_pre_key_used<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    kyber_prekey_id: KyberPreKeyId,
    ec_prekey_id: SignedPreKeyId,
    base_key: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
 
fn mark_kyber_pre_key_used<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    kyber_prekey_id: KyberPreKeyId,
    ec_prekey_id: SignedPreKeyId,
    base_key: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Mark the entry for 
kyber_prekey_id as “used”. Read moreAuto Trait Implementations§
impl Freeze for InMemKyberPreKeyStore
impl RefUnwindSafe for InMemKyberPreKeyStore
impl Send for InMemKyberPreKeyStore
impl Sync for InMemKyberPreKeyStore
impl Unpin for InMemKyberPreKeyStore
impl UnwindSafe for InMemKyberPreKeyStore
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