Expand description
In-Memory key storage.
Trait Implementations
sourceimpl<SK: Debug, SIG: Debug> Debug for Storage<SK, SIG> where
SK: SecretKey,
SIG: Signature,
SK::PK: Debug,
SK::PK: Debug,
SK::PK: Debug,
SK::PK: Debug,
impl<SK: Debug, SIG: Debug> Debug for Storage<SK, SIG> where
SK: SecretKey,
SIG: Signature,
SK::PK: Debug,
SK::PK: Debug,
SK::PK: Debug,
SK::PK: Debug,
sourceimpl<SK, SIG> IdentityKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
impl<SK, SIG> IdentityKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
sourcefn get_identity_key_pair(&self) -> &KeyPair<SK>
fn get_identity_key_pair(&self) -> &KeyPair<SK>
Get an identity IdentityKeyPair
.
sourcefn save_identity(&mut self, identity: &SK::PK) -> Result<(), StorageError>
fn save_identity(&mut self, identity: &SK::PK) -> Result<(), StorageError>
Save a known identity.
sourcefn is_known_identity(&self, identity: &SK::PK) -> Result<bool, StorageError>
fn is_known_identity(&self, identity: &SK::PK) -> Result<bool, StorageError>
Check if an identity is known.
sourceimpl<SK, SIG> OnetimeKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
impl<SK, SIG> OnetimeKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
sourcefn get_onetime_keypair(
&self,
key: &SK::PK
) -> Result<Option<&KeyPair<SK>>, StorageError>
fn get_onetime_keypair(
&self,
key: &SK::PK
) -> Result<Option<&KeyPair<SK>>, StorageError>
Get a OnetimeKeyPair
.
sourcefn save_onetime_keypair(
&mut self,
keypair: KeyPair<SK>
) -> Result<(), StorageError>
fn save_onetime_keypair(
&mut self,
keypair: KeyPair<SK>
) -> Result<(), StorageError>
Save a OnetimeKeyPair
.
sourcefn forget_onetime_keypair(&mut self, key: &SK::PK) -> Result<(), StorageError>
fn forget_onetime_keypair(&mut self, key: &SK::PK) -> Result<(), StorageError>
Forget a OnetimeKeyPair
.
sourcefn is_onetime_keys_empty(&self) -> Result<bool, StorageError>
fn is_onetime_keys_empty(&self) -> Result<bool, StorageError>
Check if there are keys available.
sourcefn provide_ontime_key(&self) -> Result<Option<&SK::PK>, StorageError>
fn provide_ontime_key(&self) -> Result<Option<&SK::PK>, StorageError>
Provide a single onetime key. Returns None
if storage is empty.
sourceimpl<SK, SIG> PreKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
impl<SK, SIG> PreKeyStorage<SK> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
sourcefn get_prekey_pair(&self) -> &KeyPair<SK>
fn get_prekey_pair(&self) -> &KeyPair<SK>
Get a prekey PreKeyPair
.
sourcefn save_prekey(&mut self, key: &SK::PK) -> Result<(), StorageError>
fn save_prekey(&mut self, key: &SK::PK) -> Result<(), StorageError>
Save a known identity.
sourcefn is_known_prekey(&self, key: &SK::PK) -> Result<bool, StorageError>
fn is_known_prekey(&self, key: &SK::PK) -> Result<bool, StorageError>
Check if a prekey is known.
sourceimpl<SK, SIG> ProtocolStorage<SK, <SK as SecretKey>::PK, SIG> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
impl<SK, SIG> ProtocolStorage<SK, <SK as SecretKey>::PK, SIG> for Storage<SK, SIG> where
SK: SecretKey,
SK::PK: Eq + Hash,
SIG: Signature,
Auto Trait Implementations
impl<SK, SIG> RefUnwindSafe for Storage<SK, SIG> where
SIG: RefUnwindSafe,
SK: RefUnwindSafe,
<SK as SecretKey>::PK: RefUnwindSafe,
impl<SK, SIG> Send for Storage<SK, SIG> where
SIG: Send,
SK: Send,
<SK as SecretKey>::PK: Send,
impl<SK, SIG> Sync for Storage<SK, SIG> where
SIG: Sync,
SK: Sync,
<SK as SecretKey>::PK: Sync,
impl<SK, SIG> Unpin for Storage<SK, SIG> where
SIG: Unpin,
SK: Unpin,
<SK as SecretKey>::PK: Unpin,
impl<SK, SIG> UnwindSafe for Storage<SK, SIG> where
SIG: UnwindSafe,
SK: UnwindSafe,
<SK as SecretKey>::PK: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more