pub struct SchemeSlug {
pub chain_id: ChainId,
pub name: CompactString,
}Expand description
Unique identifier for a scheme handler (chain + scheme name).
Fields§
§chain_id: ChainIdChain this handler operates on.
name: CompactStringScheme name ("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 slug.
Sourcepub fn as_wildcard(&self) -> Self
pub fn as_wildcard(&self) -> Self
Wildcard copy with the reference replaced by *.
Sourcepub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Whether the reference is *.
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<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