Trait rem_utils::labelling::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