pub struct ChainKey {
pub namespace: ChainKeyNamespace,
pub id: ChainKeyId,
}Expand description
A ChainKey represents a blockchain network identifier, consisting of a namespace and a chain id.
The namespace indicates the type of blockchain (e.g., “ethereum”, “bitcoin”),
while the id specifies the particular network within that namespace (e.g., “1”, “cosmoshub”).
Mostly follows the specification at https://chainagnostic.org/CAIPs/caip-2 but allows the namespace part to 1 to 32 characters instead of 3 to 8 and changes the naming of chain_id -> chain_key, reference -> chain_id
Fields§
§namespace: ChainKeyNamespace§id: ChainKeyIdImplementations§
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ChainKey
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ChainKey
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<'de> Deserialize<'de> for ChainKey
impl<'de> Deserialize<'de> for ChainKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ChainKey
Source§impl From<&AnyChainConfig> for ChainKey
impl From<&AnyChainConfig> for ChainKey
Source§fn from(config: &AnyChainConfig) -> Self
fn from(config: &AnyChainConfig) -> Self
Converts to this type from the input type.
Source§impl From<&CosmosChainConfig> for ChainKey
impl From<&CosmosChainConfig> for ChainKey
Source§fn from(config: &CosmosChainConfig) -> Self
fn from(config: &CosmosChainConfig) -> Self
Converts to this type from the input type.
Source§impl From<&EvmChainConfig> for ChainKey
impl From<&EvmChainConfig> for ChainKey
Source§fn from(config: &EvmChainConfig) -> Self
fn from(config: &EvmChainConfig) -> Self
Converts to this type from the input type.
Source§impl From<AnyChainConfig> for ChainKey
impl From<AnyChainConfig> for ChainKey
Source§fn from(config: AnyChainConfig) -> Self
fn from(config: AnyChainConfig) -> Self
Converts to this type from the input type.
Source§impl From<CosmosChainConfig> for ChainKey
impl From<CosmosChainConfig> for ChainKey
Source§fn from(config: CosmosChainConfig) -> Self
fn from(config: CosmosChainConfig) -> Self
Converts to this type from the input type.
Source§impl From<EvmChainConfig> for ChainKey
impl From<EvmChainConfig> for ChainKey
Source§fn from(config: EvmChainConfig) -> Self
fn from(config: EvmChainConfig) -> Self
Converts to this type from the input type.
Source§impl Ord for ChainKey
impl Ord for ChainKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ChainKey
impl PartialOrd for ChainKey
impl StructuralPartialEq for ChainKey
Auto Trait Implementations§
impl Freeze for ChainKey
impl RefUnwindSafe for ChainKey
impl Send for ChainKey
impl Sync for ChainKey
impl Unpin for ChainKey
impl UnsafeUnpin for ChainKey
impl UnwindSafe for ChainKey
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
impl<T> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.