Trait fvm_ipld_hamt::Hash

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

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

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

Required Methods§

source

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

Provided Methods§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Hash for bool

source§

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

source§

impl Hash for char

source§

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

source§

impl Hash for i8

source§

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

source§

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

source§

impl Hash for i16

source§

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

source§

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

source§

impl Hash for i32

source§

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

source§

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

source§

impl Hash for i64

source§

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

source§

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

source§

impl Hash for i128

source§

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

source§

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

source§

impl Hash for isize

source§

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

source§

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

source§

impl Hash for str

source§

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

source§

impl Hash for u8

source§

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

source§

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

source§

impl Hash for u16

source§

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

source§

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

source§

impl Hash for u32

source§

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

source§

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

source§

impl Hash for u64

source§

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

source§

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

source§

impl Hash for u128

source§

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

source§

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

source§

impl Hash for ()

source§

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

source§

impl Hash for usize

source§

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

source§

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

source§

impl Hash for String

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T> Hash for [T]
where T: Hash,

source§

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

source§

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

source§

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

Implementors§