Trait forest_hash_utils::Hash

source ·
pub trait Hash {
    // Required method
    fn hash<H: Hasher>(&self, state: &mut H);

    // Provided method
    fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
       where Self: Sized { ... }
}
Expand description

Custom trait to avoid issues like https://github.com/rust-lang/rust/issues/27108.

Required Methods§

source

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

Provided Methods§

source

fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Hash for bool

source§

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

source§

impl Hash for char

source§

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

source§

impl Hash for i8

source§

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

source§

fn hash_slice<H: Hasher>(data: &[i8], state: &mut H)

source§

impl Hash for i16

source§

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

source§

fn hash_slice<H: Hasher>(data: &[i16], state: &mut H)

source§

impl Hash for i32

source§

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

source§

fn hash_slice<H: Hasher>(data: &[i32], state: &mut H)

source§

impl Hash for i64

source§

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

source§

fn hash_slice<H: Hasher>(data: &[i64], state: &mut H)

source§

impl Hash for i128

source§

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

source§

fn hash_slice<H: Hasher>(data: &[i128], state: &mut H)

source§

impl Hash for isize

source§

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

source§

fn hash_slice<H: Hasher>(data: &[isize], state: &mut H)

source§

impl Hash for str

source§

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

source§

impl Hash for u8

source§

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

source§

fn hash_slice<H: Hasher>(data: &[u8], state: &mut H)

source§

impl Hash for u16

source§

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

source§

fn hash_slice<H: Hasher>(data: &[u16], state: &mut H)

source§

impl Hash for u32

source§

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

source§

fn hash_slice<H: Hasher>(data: &[u32], state: &mut H)

source§

impl Hash for u64

source§

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

source§

fn hash_slice<H: Hasher>(data: &[u64], state: &mut H)

source§

impl Hash for u128

source§

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

source§

fn hash_slice<H: Hasher>(data: &[u128], state: &mut H)

source§

impl Hash for ()

source§

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

source§

impl Hash for usize

source§

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

source§

fn hash_slice<H: Hasher>(data: &[usize], state: &mut H)

source§

impl Hash for String

source§

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

source§

impl<A> Hash for (A,)
where A: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B> Hash for (A, B)
where B: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C> Hash for (A, B, C)
where C: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D> Hash for (A, B, C, D)
where D: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E> Hash for (A, B, C, D, E)
where E: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F> Hash for (A, B, C, D, E, F)
where F: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G> Hash for (A, B, C, D, E, F, G)
where G: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H> Hash for (A, B, C, D, E, F, G, H)
where H: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H: Hash, I> Hash for (A, B, C, D, E, F, G, H, I)
where I: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H: Hash, I: Hash, J> Hash for (A, B, C, D, E, F, G, H, I, J)
where J: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H: Hash, I: Hash, J: Hash, K> Hash for (A, B, C, D, E, F, G, H, I, J, K)
where K: ?Sized + Hash,

source§

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

source§

impl<A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H: Hash, I: Hash, J: Hash, K: Hash, L> Hash for (A, B, C, D, E, F, G, H, I, J, K, L)
where L: ?Sized + Hash,

source§

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

source§

impl<T: Hash> Hash for [T]

source§

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

source§

impl<T: Hash> Hash for Vec<T>

source§

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

source§

impl<T: ?Sized + Hash> Hash for &T

source§

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

source§

impl<T: ?Sized + Hash> Hash for &mut T

source§

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

source§

impl<T: ?Sized> Hash for *const T

source§

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

source§

impl<T: ?Sized> Hash for *mut T

source§

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

Implementors§