pub struct InMemoryIdentityKeyStore {
pub trust_on_first_use: bool,
/* private fields */
}
Expand description
An in-memory IdentityKeyStore
.
Fields§
§trust_on_first_use: bool
Should recipients be trusted the first time they are contacted?
Implementations§
Source§impl InMemoryIdentityKeyStore
impl InMemoryIdentityKeyStore
Sourcepub fn new(
registration_id: u32,
identity: &IdentityKeyPair,
) -> InMemoryIdentityKeyStore
pub fn new( registration_id: u32, identity: &IdentityKeyPair, ) -> InMemoryIdentityKeyStore
Create a new InMemoryIdentityKeyStore
.
Trait Implementations§
Source§impl Debug for InMemoryIdentityKeyStore
impl Debug for InMemoryIdentityKeyStore
Source§impl IdentityKeyStore for InMemoryIdentityKeyStore
impl IdentityKeyStore for InMemoryIdentityKeyStore
Source§fn local_registration_id(&self) -> Result<u32, InternalError>
fn local_registration_id(&self) -> Result<u32, InternalError>
Get the local client’s registration ID. Read more
Source§fn identity_key_pair(&self) -> Result<(Buffer, Buffer), InternalError>
fn identity_key_pair(&self) -> Result<(Buffer, Buffer), InternalError>
Get the local client’s identity key pair as the tuple
(public, private)
.Source§fn is_trusted_identity(
&self,
address: Address,
identity_key: &[u8],
) -> Result<bool, InternalError>
fn is_trusted_identity( &self, address: Address, identity_key: &[u8], ) -> Result<bool, InternalError>
Verify a remote client’s identity key. Read more
Source§fn save_identity(
&self,
addr: Address,
identity_key: &[u8],
) -> Result<(), InternalError>
fn save_identity( &self, addr: Address, identity_key: &[u8], ) -> Result<(), InternalError>
Save a remote client’s identity key as trusted. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryIdentityKeyStore
impl RefUnwindSafe for InMemoryIdentityKeyStore
impl !Send for InMemoryIdentityKeyStore
impl !Sync for InMemoryIdentityKeyStore
impl Unpin for InMemoryIdentityKeyStore
impl UnwindSafe for InMemoryIdentityKeyStore
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