pub struct MemoryIdentityStore { /* private fields */ }Expand description
In-memory identity key storage (data lost on process termination)
Implementations§
Trait Implementations§
Source§impl Default for MemoryIdentityStore
impl Default for MemoryIdentityStore
Source§impl ExtendedIdentityStore for MemoryIdentityStore
impl ExtendedIdentityStore for MemoryIdentityStore
fn identity_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_local_identity_key_pair<'life0, 'life1, 'async_trait>(
&'life0 self,
identity_key_pair: &'life1 IdentityKeyPair,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_local_registration_id<'life0, 'async_trait>(
&'life0 self,
registration_id: u32,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_peer_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<IdentityKey>, Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_identity<'life0, 'life1, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_all_identities<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_local_identity<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl IdentityKeyStore for MemoryIdentityStore
impl IdentityKeyStore for MemoryIdentityStore
Source§fn get_identity_key_pair<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IdentityKeyPair, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_identity_key_pair<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IdentityKeyPair, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the single specific identity the store is assumed to represent, with private key.
Source§fn get_local_registration_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_local_registration_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn save_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
identity_key: &'life2 IdentityKey,
) -> Pin<Box<dyn Future<Output = Result<IdentityChange, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
address: &'life1 ProtocolAddress,
identity_key: &'life2 IdentityKey,
) -> Pin<Box<dyn Future<Output = Result<IdentityChange, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record an identity into the store. The identity is then considered “trusted”. Read more
Source§fn is_trusted_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
identity_key: &'life2 IdentityKey,
_direction: Direction,
) -> Pin<Box<dyn Future<Output = Result<bool, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_trusted_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
identity_key: &'life2 IdentityKey,
_direction: Direction,
) -> Pin<Box<dyn Future<Output = Result<bool, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return whether an identity is trusted for the role specified by
direction.Source§fn get_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<IdentityKey>, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ProtocolAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<IdentityKey>, SignalProtocolError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the public identity for the given
address, if known.Auto Trait Implementations§
impl Freeze for MemoryIdentityStore
impl !RefUnwindSafe for MemoryIdentityStore
impl Send for MemoryIdentityStore
impl Sync for MemoryIdentityStore
impl Unpin for MemoryIdentityStore
impl !UnwindSafe for MemoryIdentityStore
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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