pub struct InMemIdentityKeyStore { /* private fields */ }Expand description
Reference implementation of traits::IdentityKeyStore.
Implementations§
Source§impl InMemIdentityKeyStore
impl InMemIdentityKeyStore
Sourcepub fn new(key_pair: IdentityKeyPair, registration_id: u32) -> Self
pub fn new(key_pair: IdentityKeyPair, registration_id: u32) -> Self
Create a new instance.
key_pair corresponds to traits::IdentityKeyStore::get_identity_key_pair, and
registration_id corresponds to traits::IdentityKeyStore::get_local_registration_id.
Trait Implementations§
Source§impl Clone for InMemIdentityKeyStore
impl Clone for InMemIdentityKeyStore
Source§fn clone(&self) -> InMemIdentityKeyStore
fn clone(&self) -> InMemIdentityKeyStore
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 IdentityKeyStore for InMemIdentityKeyStore
impl IdentityKeyStore for InMemIdentityKeyStore
Source§fn get_identity_key_pair<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IdentityKeyPair>> + '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>> + '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>> + '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>> + '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: &'life2 IdentityKey,
) -> Pin<Box<dyn Future<Output = Result<IdentityChange>> + '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: &'life2 IdentityKey,
) -> Pin<Box<dyn Future<Output = Result<IdentityChange>> + '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: &'life2 IdentityKey,
_direction: Direction,
) -> Pin<Box<dyn Future<Output = Result<bool>> + '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: &'life2 IdentityKey,
_direction: Direction,
) -> Pin<Box<dyn Future<Output = Result<bool>> + '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>>> + '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>>> + '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 InMemIdentityKeyStore
impl RefUnwindSafe for InMemIdentityKeyStore
impl Send for InMemIdentityKeyStore
impl Sync for InMemIdentityKeyStore
impl Unpin for InMemIdentityKeyStore
impl UnwindSafe for InMemIdentityKeyStore
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