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 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 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<bool>> + '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<bool>> + '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§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