Trait ASTKey

Source
pub trait ASTKey {
    // Required methods
    fn eq(&self, other: &dyn ASTKey) -> bool;
    fn hash(&self) -> u64;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Type erasing keys

Required Methods§

Source

fn eq(&self, other: &dyn ASTKey) -> bool

Source

fn hash(&self) -> u64

Source

fn as_any(&self) -> &dyn Any

Trait Implementations§

Source§

impl<'a> Hash for &'a dyn ASTKey

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Hash for Box<dyn ASTKey>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> PartialEq for &'a dyn ASTKey

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Box<dyn ASTKey>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for &'a dyn ASTKey

Source§

impl Eq for Box<dyn ASTKey>

Implementors§

Source§

impl<T: Eq + Hash + 'static> ASTKey for T