Trait HashObj

Source
pub trait HashObj {
    // Required methods
    fn hash_object(&self, state: &mut dyn Hasher);
    fn as_hash_object(&self) -> &dyn HashObj;
    fn to_hash_object(self) -> Box<dyn HashObj>
       where Self: 'static;
}
Expand description

Object-safe version of std::hash::Hash

Required Methods§

Source

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

Source

fn as_hash_object(&self) -> &dyn HashObj

Source

fn to_hash_object(self) -> Box<dyn HashObj>
where Self: 'static,

Trait Implementations§

Source§

impl Hash for dyn HashObj

Source§

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

Feeds this value into the given Hasher. Read more

Implementors§

Source§

impl<T: Hash> HashObj for T