Struct HoprKeyIdent
pub struct HoprKeyIdent<const N: usize = 4>([u8; N]);Expand description
Identifier of public keys.
Tuple Fields§
§0: [u8; N]Trait Implementations§
§impl<'de, const N: usize> Deserialize<'de> for KeyIdent<N>
impl<'de, const N: usize> Deserialize<'de> for KeyIdent<N>
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyIdent<N>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyIdent<N>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<B> KeyIdMapping<KeyIdent, OffchainPublicKey> for HoprKeyMapper<B>
impl<B> KeyIdMapping<KeyIdent, OffchainPublicKey> for HoprKeyMapper<B>
Source§fn map_key_to_id(&self, key: &OffchainPublicKey) -> Option<HoprKeyIdent>
fn map_key_to_id(&self, key: &OffchainPublicKey) -> Option<HoprKeyIdent>
Maps public key to its unique identifier.
Source§fn map_id_to_public(&self, id: &HoprKeyIdent) -> Option<OffchainPublicKey>
fn map_id_to_public(&self, id: &HoprKeyIdent) -> Option<OffchainPublicKey>
Maps public key identifier to the actual public key.
§fn map_keys_to_ids(&self, keys: &[K]) -> Vec<Option<Id>>
fn map_keys_to_ids(&self, keys: &[K]) -> Vec<Option<Id>>
Convenience method to map a slice of public keys to IDs.
§fn map_ids_to_keys(&self, ids: &[Id]) -> Vec<Option<K>>
fn map_ids_to_keys(&self, ids: &[Id]) -> Vec<Option<K>>
Convenience method to map a slice of IDs to public keys.
§impl<const N: usize> Ord for KeyIdent<N>
impl<const N: usize> Ord for KeyIdent<N>
§impl<const N: usize> PartialOrd for KeyIdent<N>
impl<const N: usize> PartialOrd for KeyIdent<N>
§impl<const N: usize> Serialize for KeyIdent<N>
impl<const N: usize> Serialize for KeyIdent<N>
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<const N: usize> Copy for KeyIdent<N>
impl<const N: usize> Eq for KeyIdent<N>
impl<const N: usize> StructuralPartialEq for KeyIdent<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for KeyIdent<N>
impl<const N: usize> RefUnwindSafe for KeyIdent<N>
impl<const N: usize> Send for KeyIdent<N>
impl<const N: usize> Sync for KeyIdent<N>
impl<const N: usize> Unpin for KeyIdent<N>
impl<const N: usize> UnwindSafe for KeyIdent<N>
Blanket Implementations§
§impl<T> ToHex for T
impl<T> ToHex for T
§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
👎Deprecated: use
ToHexExt insteadEncode the hex strict representing
self into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
👎Deprecated: use
ToHexExt insteadEncode the hex strict representing
self into the result.
Upper case letters are used (e.g. F9B4CA).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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToHex for Twhere
T: BytesRepresentable,
impl<T> ToHex for Twhere
T: BytesRepresentable,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)§impl<T> ToHexExt for T
impl<T> ToHexExt for T
§fn encode_hex(&self) -> String
fn encode_hex(&self) -> String
Encode the hex strict representing
self into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper(&self) -> String
fn encode_hex_upper(&self) -> String
Encode the hex strict representing
self into the result.
Upper case letters are used (e.g. F9B4CA).§fn encode_hex_with_prefix(&self) -> String
fn encode_hex_with_prefix(&self) -> String
Encode the hex strict representing
self into the result with prefix 0x.
Lower case letters are used (e.g. 0xf9b4ca).§fn encode_hex_upper_with_prefix(&self) -> String
fn encode_hex_upper_with_prefix(&self) -> String
Encode the hex strict representing
self into the result with prefix 0X.
Upper case letters are used (e.g. 0xF9B4CA).§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.