Enum debris_common::ident::Ident
source · pub enum Ident {
Value(SmolStr),
Index(usize),
Special(SpecialIdent),
}
Expand description
identifier for a value
The special variant is used to access special variants of types, like binary operation functions.
Variants§
Value(SmolStr)
Since Idents have be cloned quite often a generic value is
represented by a SmolString
which is stack-allocated for the
majority of practical values
Index(usize)
Special(SpecialIdent)
Implementations§
Trait Implementations§
source§impl From<SpecialIdent> for Ident
impl From<SpecialIdent> for Ident
source§fn from(special: SpecialIdent) -> Self
fn from(special: SpecialIdent) -> Self
Converts to this type from the input type.
source§impl PartialEq<&str> for Ident
impl PartialEq<&str> for Ident
source§impl PartialEq<Ident> for &str
impl PartialEq<Ident> for &str
source§impl PartialEq for Ident
impl PartialEq for Ident
impl Eq for Ident
impl StructuralEq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
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
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.