Skip to main content

DynamicHasher

Trait DynamicHasher 

Source
pub trait DynamicHasher {
    // Required methods
    fn write_bytes(&mut self, bytes: &[u8]);
    fn finish(&self) -> u64;
}
Expand description

A hashing sink used by structural hash descriptors (§5.5). Concrete implementations feed bytes into a hash state; StructHasher is the built-in implementation used by the scalar and collection descriptors.

Required Methods§

Source

fn write_bytes(&mut self, bytes: &[u8])

Source

fn finish(&self) -> u64

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§