pub struct CacheKeyMapper(/* private fields */);
Implementations§
Source§impl CacheKeyMapper
impl CacheKeyMapper
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn update_key_id_binding(
&self,
account: &AccountEntry,
) -> Result<(), DbSqlError>
pub fn update_key_id_binding( &self, account: &AccountEntry, ) -> Result<(), DbSqlError>
Creates key id mapping for a public key of an account.
Does nothing if the binding already exists. Returns error if an existing binding is not consistent.
Trait Implementations§
Source§impl Clone for CacheKeyMapper
impl Clone for CacheKeyMapper
Source§fn clone(&self) -> CacheKeyMapper
fn clone(&self) -> CacheKeyMapper
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 Debug for CacheKeyMapper
impl Debug for CacheKeyMapper
Source§impl KeyIdMapper<Ed25519Suite, HoprSphinxHeaderSpec> for CacheKeyMapper
impl KeyIdMapper<Ed25519Suite, HoprSphinxHeaderSpec> for CacheKeyMapper
Source§fn map_key_to_id(&self, key: &OffchainPublicKey) -> Option<KeyIdent>
fn map_key_to_id(&self, key: &OffchainPublicKey) -> Option<KeyIdent>
Maps public key to its unique identifier.
Source§fn map_id_to_public(&self, id: &KeyIdent) -> Option<OffchainPublicKey>
fn map_id_to_public(&self, id: &KeyIdent) -> Option<OffchainPublicKey>
Maps public key identifier to the actual public key.
Source§fn map_keys_to_ids(
&self,
keys: &[<<S as SphinxSuite>::P as Keypair>::Public],
) -> Vec<Option<<H as SphinxHeaderSpec>::KeyId>>
fn map_keys_to_ids( &self, keys: &[<<S as SphinxSuite>::P as Keypair>::Public], ) -> Vec<Option<<H as SphinxHeaderSpec>::KeyId>>
Convenience method to map a slice of public keys to IDs.
Source§fn map_ids_to_keys(
&self,
ids: &[<H as SphinxHeaderSpec>::KeyId],
) -> Vec<Option<<<S as SphinxSuite>::P as Keypair>::Public>>
fn map_ids_to_keys( &self, ids: &[<H as SphinxHeaderSpec>::KeyId], ) -> Vec<Option<<<S as SphinxSuite>::P as Keypair>::Public>>
Convenience method to map a slice of IDs to public keys.
Auto Trait Implementations§
impl Freeze for CacheKeyMapper
impl !RefUnwindSafe for CacheKeyMapper
impl Send for CacheKeyMapper
impl Sync for CacheKeyMapper
impl Unpin for CacheKeyMapper
impl !UnwindSafe for CacheKeyMapper
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,
§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