#[non_exhaustive]pub enum ChainIdPattern {
Wildcard {
namespace: String,
},
Exact {
namespace: String,
reference: String,
},
Set {
namespace: String,
references: HashSet<String>,
},
}Expand description
Pattern for matching ChainId values.
- Wildcard:
"eip155:*" - Exact:
"eip155:8453" - Set:
"eip155:{1,8453,137}"
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Wildcard
Any chain in namespace.
Exact
One specific chain.
Set
Any reference in references within namespace.
Implementations§
Source§impl ChainIdPattern
impl ChainIdPattern
Sourcepub fn wildcard<S: Into<String>>(namespace: S) -> Self
pub fn wildcard<S: Into<String>>(namespace: S) -> Self
Wildcard matching any chain in namespace.
Sourcepub fn exact<N: Into<String>, R: Into<String>>(
namespace: N,
reference: R,
) -> Self
pub fn exact<N: Into<String>, R: Into<String>>( namespace: N, reference: R, ) -> Self
Exact match on namespace and reference.
Trait Implementations§
Source§impl Clone for ChainIdPattern
impl Clone for ChainIdPattern
Source§fn clone(&self) -> ChainIdPattern
fn clone(&self) -> ChainIdPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ChainIdPattern
impl Debug for ChainIdPattern
Source§impl<'de> Deserialize<'de> for ChainIdPattern
impl<'de> Deserialize<'de> for ChainIdPattern
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
Source§impl Display for ChainIdPattern
impl Display for ChainIdPattern
impl Eq for ChainIdPattern
Source§impl From<ChainId> for ChainIdPattern
impl From<ChainId> for ChainIdPattern
Source§impl FromStr for ChainIdPattern
impl FromStr for ChainIdPattern
Source§impl PartialEq for ChainIdPattern
impl PartialEq for ChainIdPattern
Source§impl Serialize for ChainIdPattern
impl Serialize for ChainIdPattern
impl StructuralPartialEq for ChainIdPattern
Auto Trait Implementations§
impl Freeze for ChainIdPattern
impl RefUnwindSafe for ChainIdPattern
impl Send for ChainIdPattern
impl Sync for ChainIdPattern
impl Unpin for ChainIdPattern
impl UnsafeUnpin for ChainIdPattern
impl UnwindSafe for ChainIdPattern
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more