Skip to main content

HashFinalize

Trait HashFinalize 

Source
pub trait HashFinalize {
    // Provided methods
    fn word_hash(parts: &[&[u8]], storage_bytes: usize) -> u64
       where Self: BuildHasher + Default { ... }
    fn finalize_hash(raw: u64, _storage_bytes: usize) -> u64 { ... }
}
Expand description

Computes and finalizes cached Pauli-word hashes. Custom hashers can use the defaults with an empty implementation.

Provided Methods§

Source

fn word_hash(parts: &[&[u8]], storage_bytes: usize) -> u64
where Self: BuildHasher + Default,

Hash a Pauli word given its bit arrays as byte slices (X, Z, and for lossy words the loss bits), each storage_bytes long.

Source

fn finalize_hash(raw: u64, _storage_bytes: usize) -> u64

Adjust the raw digest computed by the default word_hash. The default returns it unchanged.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HashFinalize for BuildHasherDefault<FxHasher>

Source§

fn word_hash(parts: &[&[u8]], _storage_bytes: usize) -> u64

Implementors§