pub struct SchemeSlug {
pub chain_id: ChainId,
pub name: CompactString,
}Expand description
Unique identifier for a scheme handler instance.
Fields§
§chain_id: ChainIdChain this handler operates on.
name: CompactStringScheme name (e.g. "exact", "upto").
Implementations§
Source§impl SchemeSlug
impl SchemeSlug
Sourcepub const fn new(chain_id: ChainId, name: CompactString) -> Self
pub const fn new(chain_id: ChainId, name: CompactString) -> Self
Constructs a new slug.
Sourcepub fn as_wildcard(&self) -> Self
pub fn as_wildcard(&self) -> Self
Returns a wildcard version with the reference replaced by *.
Sourcepub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Returns true when the reference is the wildcard *.
Trait Implementations§
Source§impl Clone for SchemeSlug
impl Clone for SchemeSlug
Source§fn clone(&self) -> SchemeSlug
fn clone(&self) -> SchemeSlug
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 SchemeSlug
impl Debug for SchemeSlug
Source§impl Display for SchemeSlug
impl Display for SchemeSlug
impl Eq for SchemeSlug
Source§impl Hash for SchemeSlug
impl Hash for SchemeSlug
Source§impl PartialEq for SchemeSlug
impl PartialEq for SchemeSlug
impl StructuralPartialEq for SchemeSlug
Auto Trait Implementations§
impl Freeze for SchemeSlug
impl RefUnwindSafe for SchemeSlug
impl Send for SchemeSlug
impl Sync for SchemeSlug
impl Unpin for SchemeSlug
impl UnsafeUnpin for SchemeSlug
impl UnwindSafe for SchemeSlug
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> 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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Pointable for T
impl<T> Pointable for T
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