Struct wasmparser::names::KebabName
source · pub struct KebabName { /* private fields */ }Expand description
A “kebab name” in the component model which is backed by T, which defaults
to String.
This name can be either:
- a
KebabStr:a-b-c - a method name :
[method]a-b.c-d - a static method name :
[static]a-b.c-d - a constructor:
[constructor]a-b
Equality and hashing
Note that this type the Method and Static variants are considered equal
and hash to the same value. This enables disallowing clashes between the two
where method name overlap cannot happen.
Implementations§
source§impl KebabName
impl KebabName
sourcepub fn new(name: ComponentExternName<'_>, offset: usize) -> Result<KebabName>
pub fn new(name: ComponentExternName<'_>, offset: usize) -> Result<KebabName>
Attempts to parse name as a kebab name, returning None if it’s not
valid.
sourcepub fn kind(&self) -> KebabNameKind<'_>
pub fn kind(&self) -> KebabNameKind<'_>
Returns the KebabNameKind corresponding to this name.
Trait Implementations§
source§impl PartialEq<KebabName> for KebabName
impl PartialEq<KebabName> for KebabName
impl Eq for KebabName
Auto Trait Implementations§
impl RefUnwindSafe for KebabName
impl Send for KebabName
impl Sync for KebabName
impl Unpin for KebabName
impl UnwindSafe for KebabName
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.