Trait anyhash::Hash

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

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

A hashable type.

Required Methods§

source

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

Feeds this value into the given HasherWrite.

Provided Methods§

source

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

Feeds a slice of this type into the given HasherWrite.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Hash for Ordering

source§

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

source§

impl Hash for Infallible

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl Hash for IpAddr

Available on crate feature std only.
source§

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

source§

impl Hash for SocketAddr

Available on crate feature std only.
source§

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

source§

impl Hash for Ordering

source§

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

source§

impl Hash for Component<'_>

Available on crate feature std only.
source§

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

source§

impl Hash for Prefix<'_>

Available on crate feature std only.
source§

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

source§

impl Hash for bool

source§

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

source§

impl Hash for char

source§

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

source§

impl Hash for i8

source§

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

source§

impl Hash for i16

source§

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

source§

impl Hash for i32

source§

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

source§

impl Hash for i64

source§

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

source§

impl Hash for i128

source§

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

source§

impl Hash for isize

source§

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

source§

impl Hash for str

source§

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

source§

impl Hash for u8

source§

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

source§

impl Hash for u16

source§

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

source§

impl Hash for u32

source§

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

source§

impl Hash for u64

source§

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

source§

impl Hash for u128

source§

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

source§

impl Hash for ()

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl Hash for usize

source§

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

source§

impl Hash for CString

Available on crate feature alloc only.
source§

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

source§

impl Hash for String

Available on crate feature alloc only.
source§

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

source§

impl Hash for Layout

source§

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

source§

impl Hash for TypeId

source§

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

source§

impl Hash for CStr

source§

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

source§

impl Hash for Error

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl Hash for PhantomPinned

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl Hash for Ipv4Addr

Available on crate feature std only.
source§

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

source§

impl Hash for Ipv6Addr

Available on crate feature std only.
source§

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

source§

impl Hash for SocketAddrV4

Available on crate feature std only.
source§

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

source§

impl Hash for SocketAddrV6

Available on crate feature std only.
source§

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

source§

impl Hash for RangeFull

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl Hash for Location<'_>

source§

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

source§

impl Hash for Duration

source§

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

source§

impl Hash for OsStr

Available on crate feature std only.
source§

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

source§

impl Hash for OsString

Available on crate feature std only.
source§

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

source§

impl Hash for FileType

Available on crate feature std only.
source§

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

source§

impl Hash for Path

Available on crate feature std only.
source§

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

source§

impl Hash for PathBuf

Available on crate feature std only.
source§

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

source§

impl Hash for PrefixComponent<'_>

Available on crate feature std only.
source§

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

source§

impl Hash for ThreadId

Available on crate feature std only.
source§

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

source§

impl Hash for Instant

Available on crate feature std only.
source§

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

source§

impl Hash for SystemTime

Available on crate feature std only.
source§

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

source§

impl Hash for NonZeroI8

source§

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

source§

impl Hash for NonZeroI16

source§

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

source§

impl Hash for NonZeroI32

source§

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

source§

impl Hash for NonZeroI64

source§

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

source§

impl Hash for NonZeroI128

source§

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

source§

impl Hash for NonZeroIsize

source§

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

source§

impl Hash for NonZeroU8

source§

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

source§

impl Hash for NonZeroU16

source§

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

source§

impl Hash for NonZeroU32

source§

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

source§

impl Hash for NonZeroU64

source§

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

source§

impl Hash for NonZeroU128

source§

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

source§

impl Hash for NonZeroUsize

source§

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

source§

impl<B: Hash, C: Hash> Hash for ControlFlow<B, C>

source§

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

source§

impl<B: ?Sized + Hash + ToOwned> Hash for Cow<'_, B>

Available on crate feature alloc only.
source§

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

source§

impl<I: Hash> Hash for RangeInclusive<I>

source§

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

source§

impl<I: Hash> Hash for Range<I>

source§

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

source§

impl<I: Hash> Hash for RangeFrom<I>

source§

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

source§

impl<I: Hash> Hash for RangeTo<I>

source§

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

source§

impl<I: Hash> Hash for RangeToInclusive<I>

source§

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

source§

impl<K: Hash, V: Hash> Hash for BTreeMap<K, V>

Available on crate feature alloc only.
source§

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

source§

impl<P: Deref<Target = impl Hash>> Hash for Pin<P>

source§

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

source§

impl<R> Hash for fn() -> R

source§

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

source§

impl<R> Hash for extern "C" fn() -> R

source§

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

source§

impl<R, T0> Hash for fn(_: T0) -> R

source§

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

source§

impl<R, T0> Hash for extern "C" fn(_: T0) -> R

source§

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

source§

impl<R, T0, T1> Hash for fn(_: T0, _: T1) -> R

source§

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

source§

impl<R, T0, T1> Hash for extern "C" fn(_: T0, _: T1) -> R

source§

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

source§

impl<R, T0, T1, T2> Hash for fn(_: T0, _: T1, _: T2) -> R

source§

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

source§

impl<R, T0, T1, T2> Hash for extern "C" fn(_: T0, _: T1, _: T2) -> R

source§

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

source§

impl<R, T0, T1, T2, T3> Hash for fn(_: T0, _: T1, _: T2, _: T3) -> R

source§

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

source§

impl<R, T0, T1, T2, T3> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9, _: T10) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9, _: T10) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Hash for fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9, _: T10, _: T11) -> R

source§

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

source§

impl<R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Hash for extern "C" fn(_: T0, _: T1, _: T2, _: T3, _: T4, _: T5, _: T6, _: T7, _: T8, _: T9, _: T10, _: T11) -> R

source§

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

source§

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

source§

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

source§

impl<T0: Hash, T1: Hash + ?Sized> Hash for (T0, T1)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash + ?Sized> Hash for (T0, T1, T2)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash + ?Sized> Hash for (T0, T1, T2, T3)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash, T7: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash, T7: Hash, T8: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash, T7: Hash, T8: Hash, T9: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash, T7: Hash, T8: Hash, T9: Hash, T10: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

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

source§

impl<T0: Hash, T1: Hash, T2: Hash, T3: Hash, T4: Hash, T5: Hash, T6: Hash, T7: Hash, T8: Hash, T9: Hash, T10: Hash, T11: Hash + ?Sized> Hash for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

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

source§

impl<T> Hash for Discriminant<T>

source§

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

source§

impl<T: Hash> Hash for BTreeSet<T>

Available on crate feature alloc only.
source§

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

source§

impl<T: Hash> Hash for Bound<T>

source§

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

source§

impl<T: Hash> Hash for Option<T>

source§

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

source§

impl<T: Hash> Hash for Poll<T>

source§

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

source§

impl<T: Hash> Hash for [T]

source§

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

source§

impl<T: Hash> Hash for LinkedList<T>

Available on crate feature alloc only.
source§

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

source§

impl<T: Hash> Hash for VecDeque<T>

Available on crate feature alloc only.
source§

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

source§

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

Available on crate feature alloc only.
source§

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

source§

impl<T: Hash> Hash for Reverse<T>

source§

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

source§

impl<T: Hash> Hash for Saturating<T>

source§

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

source§

impl<T: Hash> Hash for Wrapping<T>

source§

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

source§

impl<T: Hash, E: Hash> Hash for Result<T, E>

source§

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

source§

impl<T: Hash, const N: usize> Hash for [T; N]

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Available on crate feature alloc only.
source§

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

source§

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

Available on crate feature alloc only.
source§

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

source§

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

Available on crate feature alloc only.
source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T: ?Sized> Hash for PhantomData<T>

source§

fn hash<H: HasherWrite>(&self, _: &mut H)

source§

impl<const N: usize> Hash for BInt<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BIntD8<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BIntD16<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BIntD32<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BUint<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BUintD8<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BUintD16<N>

Available on crate feature bnum only.
source§

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

source§

impl<const N: usize> Hash for BUintD32<N>

Available on crate feature bnum only.
source§

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

Implementors§