ArrayHash

Trait ArrayHash 

Source
pub trait ArrayHash {
    // Required method
    fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision);
}
Expand description

A hash trait for arrays that represents structural equality with a configurable level of precision. This trait is used primarily to implement common subtree elimination and other array-based caching mechanisms.

The precision of the hash defines what level of structural equality is represented. See Precision for more details.

Note that where Precision::Ptr is used, the hash is only valid for the lifetime of the object.

Required Methods§

Source

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ArrayHash for Mask

Source§

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Source§

impl ArrayHash for BitBuffer

Source§

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Source§

impl<T: Hash> ArrayHash for Buffer<T>

Source§

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Source§

impl<T: ArrayHash> ArrayHash for Option<T>

Source§

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Implementors§