ValueKey

Trait ValueKey 

Source
pub trait ValueKey:
    Send
    + Sync
    + 'static {
    // Required methods
    fn equals(&self, other: &dyn ValueKey) -> bool;
    fn hash_dyn(&self, state: &mut dyn Hasher);
    fn type_id(&self) -> TypeId;
    fn as_any(&self) -> &dyn Any;
}
Expand description

上下文 Value key 约束:可比较、可哈希、’static。

Required Methods§

Source

fn equals(&self, other: &dyn ValueKey) -> bool

Source

fn hash_dyn(&self, state: &mut dyn Hasher)

Source

fn type_id(&self) -> TypeId

Source

fn as_any(&self) -> &dyn Any

Implementors§

Source§

impl<T> ValueKey for T
where T: Eq + Hash + Send + Sync + 'static,