Trait sp_std::hash::Hash

1.0.0 · source · []
pub trait Hash {
    fn hash<H>(&self, state: &mut H)
    where
        H: Hasher
; fn hash_slice<H>(data: &[Self], state: &mut H)
    where
        H: Hasher
, { ... } }
Expand description

A hashable type.

Types implementing Hash are able to be hashed with an instance of Hasher.

Implementing Hash

You can derive Hash with #[derive(Hash)] if all fields implement Hash. The resulting hash will be the combination of the values from calling hash on each field.

#[derive(Hash)]
struct Rustacean {
    name: String,
    country: String,
}

If you need more control over how a value is hashed, you can of course implement the Hash trait yourself:

use std::hash::{Hash, Hasher};

struct Person {
    id: u32,
    name: String,
    phone: u64,
}

impl Hash for Person {
    fn hash<H: Hasher>(&self, state: &mut H) {
        self.id.hash(state);
        self.phone.hash(state);
    }
}

Hash and Eq

When implementing both Hash and Eq, it is important that the following property holds:

k1 == k2 -> hash(k1) == hash(k2)

In other words, if two keys are equal, their hashes must also be equal. HashMap and HashSet both rely on this behavior.

Thankfully, you won’t need to worry about upholding this property when deriving both Eq and Hash with #[derive(PartialEq, Eq, Hash)].

Prefix collisions

Implementations of hash should ensure that the data they pass to the Hasher are prefix-free. That is, unequal values should cause two different sequences of values to be written, and neither of the two sequences should be a prefix of the other.

For example, the standard implementation of Hash for &str passes an extra 0xFF byte to the Hasher so that the values ("ab", "c") and ("a", "bc") hash differently.

Portability

Due to differences in endianness and type sizes, data fed by Hash to a Hasher should not be considered portable across platforms. Additionally the data passed by most standard library types should not be considered stable between compiler versions.

This means tests shouldn’t probe hard-coded hash values or data fed to a Hasher and instead should check consistency with Eq.

Serialization formats intended to be portable between platforms or compiler versions should either avoid encoding hashes or only rely on Hash and Hasher implementations that provide additional guarantees.

Required methods

Feeds this value into the given Hasher.

Examples
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};

let mut hasher = DefaultHasher::new();
7920.hash(&mut hasher);
println!("Hash is {:x}!", hasher.finish());

Provided methods

Feeds a slice of this type into the given Hasher.

This method is meant as a convenience, but its implementation is also explicitly left unspecified. It isn’t guaranteed to be equivalent to repeated calls of hash and implementations of Hash should keep that in mind and call hash themselves if the slice isn’t treated as a whole unit in the PartialEq implementation.

For example, a VecDeque implementation might naïvely call as_slices and then hash_slice on each slice, but this is wrong since the two slices can change with a call to make_contiguous without affecting the PartialEq result. Since these slices aren’t treated as singular units, and instead part of a larger deque, this method cannot be used.

Examples
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};

let mut hasher = DefaultHasher::new();
let numbers = [6, 28, 496, 8128];
Hash::hash_slice(&numbers, &mut hasher);
println!("Hash is {:x}!", hasher.finish());

Implementations on Foreign Types

The hash of an array is the same as that of the corresponding slice, as required by the Borrow implementation.

#![feature(build_hasher_simple_hash_one)]
use std::hash::BuildHasher;

let b = std::collections::hash_map::RandomState::new();
let a: [u8; 3] = [0xa8, 0x3c, 0x09];
let s: &[u8] = &[0xa8, 0x3c, 0x09];
assert_eq!(b.hash_one(a), b.hash_one(s));

Implementors

The hash of a vector is the same as that of the corresponding slice, as required by the core::borrow::Borrow implementation.

#![feature(build_hasher_simple_hash_one)]
use std::hash::BuildHasher;

let b = std::collections::hash_map::RandomState::new();
let v: Vec<u8> = vec![0xa8, 0x3c, 0x09];
let s: &[u8] = &[0xa8, 0x3c, 0x09];
assert_eq!(b.hash_one(v), b.hash_one(s));

impl Hash for Error

impl Hash for Match

impl<T, const CAP: usize> Hash for ArrayVec<T, CAP> where
    T: Hash

impl<const CAP: usize> Hash for ArrayString<CAP>

impl Hash for TaskId

impl Hash for Path

impl Hash for PathBuf

impl<O, V> Hash for BitArray<O, V> where
    O: BitOrder,
    V: BitView

impl<R: Hash> Hash for BitIdx<R> where
    R: BitRegister

impl<R: Hash> Hash for BitIdxError<R> where
    R: BitRegister

impl<R: Hash> Hash for BitTail<R> where
    R: BitRegister

impl<R: Hash> Hash for BitPos<R> where
    R: BitRegister

impl<R: Hash> Hash for BitSel<R> where
    R: BitRegister

impl<R: Hash> Hash for BitMask<R> where
    R: BitRegister

impl Hash for Lsb0

impl Hash for Msb0

impl<M, T> Hash for Address<M, T> where
    M: Mutability,
    T: BitStore

impl<T: Hash> Hash for AddressError<T> where
    T: BitStore

impl<M, O, T> Hash for BitRef<'_, M, O, T> where
    M: Mutability,
    O: BitOrder,
    T: BitStore

impl<M, O, T> Hash for BitPtrRange<M, O, T> where
    M: Mutability,
    O: BitOrder,
    T: BitStore

impl<M, O, T> Hash for BitPtr<M, O, T> where
    M: Mutability,
    O: BitOrder,
    T: BitStore

impl<T: Hash> Hash for BitPtrError<T> where
    T: BitStore,
    T::Mem: Hash

impl<O, T> Hash for BitSlice<O, T> where
    O: BitOrder,
    T: BitStore

impl<O, T> Hash for BitBox<O, T> where
    O: BitOrder,
    T: BitStore

impl<O, T> Hash for BitVec<O, T> where
    O: BitOrder,
    T: BitStore

impl Hash for BStr

impl Hash for BString

impl Hash for BigEndian

impl Hash for Bytes

impl Hash for BytesMut

impl<T: Hash> Hash for CachePadded<T>

impl<T: Hash> Hash for LocalResult<T>

impl Hash for FixedOffset

impl Hash for NaiveDate

impl Hash for NaiveTime

impl<Tz: TimeZone> Hash for Date<Tz>

impl<Tz: TimeZone> Hash for DateTime<Tz>

impl Hash for Weekday

impl Hash for Month

impl<const S: usize> Hash for Cid<S>

impl Hash for Version

impl Hash for ErrorKind

impl<'a> Hash for &'a TemplateParam

impl Hash for Error

impl Hash for AtomicRmwOp

impl Hash for Block

impl Hash for Value

impl Hash for Inst

impl Hash for StackSlot

impl Hash for GlobalValue

impl Hash for Constant

impl Hash for Immediate

impl Hash for JumpTable

impl Hash for FuncRef

impl Hash for SigRef

impl Hash for Heap

impl Hash for Table

impl Hash for AnyEntity

impl Hash for Signature

impl Hash for AbiParam

impl Hash for Imm64

impl Hash for Uimm64

impl Hash for Uimm32

impl Hash for V128Imm

impl Hash for Offset32

impl Hash for Ieee32

impl Hash for Ieee64

impl Hash for Opcode

impl Hash for LibCall

impl Hash for Endianness

impl Hash for MemFlags

impl Hash for TrapCode

impl Hash for Type

impl Hash for ArgumentLoc

impl Hash for ValueLabel

impl Hash for CallConv

impl Hash for Loop

impl Hash for MachLabel

impl Hash for Builder

impl Hash for Template

impl Hash for Descriptor

impl Hash for Detail

impl Hash for Regalloc

impl Hash for OptLevel

impl Hash for TlsModel

impl Hash for IntCC

impl Hash for FloatCC

impl<T: Hash + ReservedValue> Hash for PackedOption<T>

impl<K: Hash, V: Hash> Hash for PrimaryMap<K, V> where
    K: EntityRef

impl Hash for WasmType

impl Hash for FuncIndex

impl Hash for TableIndex

impl Hash for GlobalIndex

impl Hash for MemoryIndex

impl Hash for DataIndex

impl Hash for ElemIndex

impl Hash for TypeIndex

impl Hash for ModuleIndex

impl Hash for EventIndex

impl Hash for EntityIndex

impl Hash for Global

impl Hash for GlobalInit

impl Hash for Table

impl Hash for Memory

impl Hash for Event

impl<T: Hash> Hash for CachePadded<T>

impl Hash for Scalar

impl<L: Hash, R: Hash> Hash for Either<L, R>

impl Hash for Target

impl Hash for WriteStyle

impl Hash for Errno

impl<E: Hash> Hash for Compat<E>

impl Hash for FsStats

impl<T: Hash> Hash for AssertAsync<T>

impl Hash for PollNext

impl<T: Hash> Hash for AllowStdIo<T>

impl<T: Hash, N> Hash for GenericArray<T, N> where
    N: ArrayLength<T>, 

impl Hash for Format

impl Hash for Encoding

impl Hash for Register

impl<T: Hash> Hash for DebugAbbrevOffset<T>

impl<T: Hash> Hash for DebugInfoOffset<T>

impl<T: Hash> Hash for LocationListsOffset<T>

impl<T: Hash> Hash for DebugMacinfoOffset<T>

impl<T: Hash> Hash for DebugMacroOffset<T>

impl<T: Hash> Hash for RawRangeListsOffset<T>

impl<T: Hash> Hash for RangeListsOffset<T>

impl<T: Hash> Hash for DebugTypesOffset<T>

impl<T: Hash> Hash for DebugFrameOffset<T>

impl<T: Hash> Hash for EhFrameOffset<T>

impl<T: Hash> Hash for UnitSectionOffset<T>

impl Hash for SectionId

impl Hash for DwoId

impl Hash for DwUt

impl Hash for DwCfa

impl Hash for DwChildren

impl Hash for DwTag

impl Hash for DwAt

impl Hash for DwForm

impl Hash for DwAte

impl Hash for DwLle

impl Hash for DwDs

impl Hash for DwEnd

impl Hash for DwAccess

impl Hash for DwVis

impl Hash for DwLang

impl Hash for DwAddr

impl Hash for DwId

impl Hash for DwCc

impl Hash for DwInl

impl Hash for DwOrd

impl Hash for DwDsc

impl Hash for DwIdx

impl Hash for DwDefaulted

impl Hash for DwLns

impl Hash for DwLne

impl Hash for DwLnct

impl Hash for DwMacro

impl Hash for DwRle

impl Hash for DwOp

impl Hash for DwEhPe

impl Hash for BigEndian

impl<'input, Endian: Hash> Hash for EndianSlice<'input, Endian> where
    Endian: Endianity

impl<R: Hash + Reader> Hash for LocationListEntry<R>

impl<R: Hash + Reader> Hash for Expression<R>

impl Hash for Range

impl<T: Hash> Hash for UnitOffset<T>

impl Hash for Glob

impl Hash for StreamId

impl Hash for HeaderName

impl Hash for HeaderValue

impl Hash for Method

impl Hash for StatusCode

impl Hash for Authority

impl Hash for Scheme

impl Hash for Uri

impl Hash for Version

impl Hash for Duration

impl Hash for Name

impl Hash for IfEvent

impl Hash for IpNetwork

impl Hash for Ipv4Network

impl Hash for Ipv6Network

impl Hash for IpAddrRange

impl Hash for IpNet

impl Hash for Ipv4Net

impl Hash for Ipv6Net

impl Hash for IpSubnets

impl Hash for Ipv4Subnets

impl Hash for Ipv6Subnets

impl<A: Hash, B: Hash> Hash for EitherOrBoth<A, B>

impl Hash for Id

impl Hash for Version

impl Hash for Origin

impl Hash for Port

impl Hash for Host

impl Hash for PeerId

impl Hash for ListenerId

impl Hash for Endpoint

impl Hash for FloodsubRpc

impl Hash for Topic

impl Hash for TopicHash

impl Hash for MessageId

impl<T> Hash for Key<T>

impl Hash for Key

impl Hash for QueryId

impl Hash for RequestId

impl<K: Hash + Eq, V: Hash, S: BuildHasher> Hash for LinkedHashMap<K, V, S>

impl<T, S> Hash for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher

impl<'k> Hash for Key<'k>

impl Hash for Level

impl Hash for LevelFilter

impl<'a> Hash for Metadata<'a>

impl<'a> Hash for MetadataBuilder<'a>

impl Hash for ByteSlice

impl Hash for ByteVec

impl Hash for Type

impl Hash for Tag

impl Hash for TDEFLFlush

impl Hash for TDEFLStatus

impl Hash for TINFLStatus

impl Hash for MZFlush

impl Hash for MZStatus

impl Hash for MZError

impl Hash for DataFormat

impl Hash for Token

impl<const S: usize> Hash for Multihash<S>

impl<T: Hash + Scalar> Hash for X<T>

impl<T: Hash + Scalar> Hash for XY<T>

impl<T: Hash + Scalar> Hash for XYZ<T>

impl<T: Hash + Scalar> Hash for XYZW<T>

impl<T: Hash + Scalar> Hash for XYZWA<T>

impl<T: Hash + Scalar> Hash for XYZWAB<T>

impl<T: Hash + Scalar> Hash for IJKW<T>

impl<T: Hash + Scalar> Hash for M2x2<T>

impl<T: Hash + Scalar> Hash for M2x3<T>

impl<T: Hash + Scalar> Hash for M2x4<T>

impl<T: Hash + Scalar> Hash for M2x5<T>

impl<T: Hash + Scalar> Hash for M2x6<T>

impl<T: Hash + Scalar> Hash for M3x2<T>

impl<T: Hash + Scalar> Hash for M3x3<T>

impl<T: Hash + Scalar> Hash for M3x4<T>

impl<T: Hash + Scalar> Hash for M3x5<T>

impl<T: Hash + Scalar> Hash for M3x6<T>

impl<T: Hash + Scalar> Hash for M4x2<T>

impl<T: Hash + Scalar> Hash for M4x3<T>

impl<T: Hash + Scalar> Hash for M4x4<T>

impl<T: Hash + Scalar> Hash for M4x5<T>

impl<T: Hash + Scalar> Hash for M4x6<T>

impl<T: Hash + Scalar> Hash for M5x2<T>

impl<T: Hash + Scalar> Hash for M5x3<T>

impl<T: Hash + Scalar> Hash for M5x4<T>

impl<T: Hash + Scalar> Hash for M5x5<T>

impl<T: Hash + Scalar> Hash for M5x6<T>

impl<T: Hash + Scalar> Hash for M6x2<T>

impl<T: Hash + Scalar> Hash for M6x3<T>

impl<T: Hash + Scalar> Hash for M6x4<T>

impl<T: Hash + Scalar> Hash for M6x5<T>

impl<T: Hash + Scalar> Hash for M6x6<T>

impl<const R: usize> Hash for Const<R>

impl<T: Hash, const R: usize, const C: usize> Hash for ArrayStorage<T, R, C>

impl<T, R, C, S> Hash for Matrix<T, R, C, S> where
    T: Scalar + Hash,
    R: Dim,
    C: Dim,
    S: Storage<T, R, C>, 

impl<T: Hash> Hash for Unit<T>

impl<T: Scalar + Hash, const D: usize> Hash for Point<T, D>

impl<T: Scalar + Hash, const D: usize> Hash for Rotation<T, D> where
    <DefaultAllocator as Allocator<T, Const<D>, Const<D>>>::Buffer: Hash

impl<T: Scalar + Hash> Hash for Quaternion<T>

impl<T: Scalar + Hash, const D: usize> Hash for Translation<T, D> where
    Owned<T, Const<D>>: Hash

impl<T: Scalar + Hash, R: Hash, const D: usize> Hash for Isometry<T, R, D> where
    Owned<T, Const<D>>: Hash

impl<T: Scalar + Hash, R: Hash, const D: usize> Hash for Similarity<T, R, D> where
    Owned<T, Const<D>>: Hash

impl Hash for TGeneral

impl Hash for TProjective

impl Hash for TAffine

impl Hash for Sign

impl Hash for BigInt

impl Hash for BigUint

impl<T: Hash> Hash for Complex<T>

impl<T: Clone + Integer + Hash> Hash for Ratio<T>

impl Hash for AddressSize

impl Hash for SectionKind

impl Hash for ComdatKind

impl Hash for SymbolKind

impl Hash for SymbolScope

impl Hash for FileFlags

impl<Section: Hash> Hash for SymbolFlags<Section>

impl Hash for Endianness

impl Hash for BigEndian

impl<E: Hash + Endian> Hash for U16Bytes<E>

impl<E: Hash + Endian> Hash for U32Bytes<E>

impl<E: Hash + Endian> Hash for U64Bytes<E>

impl<E: Hash + Endian> Hash for I16Bytes<E>

impl<E: Hash + Endian> Hash for I32Bytes<E>

impl<E: Hash + Endian> Hash for I64Bytes<E>

impl Hash for ArchiveKind

impl Hash for FileKind

impl Hash for SymbolIndex

impl<'data> Hash for SymbolMapName<'data>

impl<'data> Hash for ObjectMapEntry<'data>

impl<'data> Hash for CompressedData<'data>

impl<O, T: ?Sized> Hash for OwningRef<O, T> where
    T: Hash

impl<O, T: ?Sized> Hash for OwningRefMut<O, T> where
    T: Hash

impl Hash for Multiaddr

impl Hash for Type

impl Hash for ValueType

impl Hash for BlockType

impl Hash for Instruction

impl Hash for BrTableData

impl Hash for Sender

impl<R: Hash> Hash for Error<R>

impl<R: Hash> Hash for ErrorVariant<R>

impl<'i, R: Hash> Hash for Pair<'i, R>

impl<'i, R: Hash> Hash for Pairs<'i, R>

impl<'i> Hash for Position<'i>

impl<'i> Hash for Span<'i>

impl<'i, R: Hash> Hash for Token<'i, R>

impl Hash for Rule

impl Hash for U128

impl Hash for U256

impl Hash for U512

impl Hash for H128

impl Hash for H160

impl Hash for H256

impl Hash for H512

impl Hash for Ident

impl Hash for MetricType

impl Hash for InstIx

impl Hash for BlockIx

impl Hash for Reg

impl Hash for RealReg

impl Hash for VirtualReg

impl<R: Hash + WritableBase> Hash for Writable<R>

impl Hash for SpillSlot

impl Hash for Protection

impl<Header: Hash + HeaderT> Hash for RemoteCallRequest<Header> where
    Header::Hash: Hash

impl<Header: Hash + HeaderT> Hash for RemoteHeaderRequest<Header> where
    Header::Hash: Hash,
    Header::Number: Hash

impl<Header: Hash + HeaderT> Hash for RemoteReadRequest<Header> where
    Header::Hash: Hash

impl<Header: Hash + HeaderT> Hash for RemoteReadChildRequest<Header> where
    Header::Hash: Hash

impl<Header: Hash + HeaderT> Hash for RemoteBodyRequest<Header>

impl<T: Hash> Hash for SlotDuration<T>

impl Hash for ProtocolId

impl Hash for SetId

impl Hash for PublicKey

impl Hash for VRFOutput

impl Hash for VRFInOut

impl Hash for ChainCode

impl<K: Hash> Hash for ExtendedKey<K>

impl Hash for Number

impl Hash for SigId

impl<A: Array> Hash for SmallVec<A> where
    A::Item: Hash

impl Hash for OpCode

impl<'a> Hash for Incoming<'a>

impl Hash for Data

impl Hash for Public

impl Hash for Signature

impl Hash for Public

impl Hash for Signature

impl Hash for Public

impl Hash for Signature

impl Hash for AccountId32

impl Hash for Dummy

impl Hash for KeyTypeId

impl Hash for Public

impl Hash for Signature

impl Hash for Public

impl Hash for Signature

impl Hash for Public

impl Hash for Signature

impl Hash for Bytes

impl Hash for Keyring

impl Hash for Keyring

impl<AccountId: Hash, AccountIndex: Hash> Hash for MultiAddress<AccountId, AccountIndex>

impl Hash for StorageKey

impl Hash for StorageData

impl Hash for ChildInfo

impl Hash for ParseError

impl Hash for Underscore

impl Hash for Abstract

impl Hash for As

impl Hash for Async

impl Hash for Auto

impl Hash for Await

impl Hash for Become

impl Hash for Box

impl Hash for Break

impl Hash for Const

impl Hash for Continue

impl Hash for Crate

impl Hash for Default

impl Hash for Do

impl Hash for Dyn

impl Hash for Else

impl Hash for Enum

impl Hash for Extern

impl Hash for Final

impl Hash for Fn

impl Hash for For

impl Hash for If

impl Hash for Impl

impl Hash for In

impl Hash for Let

impl Hash for Loop

impl Hash for Macro

impl Hash for Match

impl Hash for Mod

impl Hash for Move

impl Hash for Mut

impl Hash for Override

impl Hash for Priv

impl Hash for Pub

impl Hash for Ref

impl Hash for Return

impl Hash for SelfType

impl Hash for SelfValue

impl Hash for Static

impl Hash for Struct

impl Hash for Super

impl Hash for Trait

impl Hash for Try

impl Hash for Type

impl Hash for Typeof

impl Hash for Union

impl Hash for Unsafe

impl Hash for Unsized

impl Hash for Use

impl Hash for Virtual

impl Hash for Where

impl Hash for While

impl Hash for Yield

impl Hash for Add

impl Hash for AddEq

impl Hash for And

impl Hash for AndAnd

impl Hash for AndEq

impl Hash for At

impl Hash for Bang

impl Hash for Caret

impl Hash for CaretEq

impl Hash for Colon

impl Hash for Colon2

impl Hash for Comma

impl Hash for Div

impl Hash for DivEq

impl Hash for Dollar

impl Hash for Dot

impl Hash for Dot2

impl Hash for Dot3

impl Hash for DotDotEq

impl Hash for Eq

impl Hash for EqEq

impl Hash for Ge

impl Hash for Gt

impl Hash for Le

impl Hash for Lt

impl Hash for MulEq

impl Hash for Ne

impl Hash for Or

impl Hash for OrEq

impl Hash for OrOr

impl Hash for Pound

impl Hash for Question

impl Hash for RArrow

impl Hash for LArrow

impl Hash for Rem

impl Hash for RemEq

impl Hash for FatArrow

impl Hash for Semi

impl Hash for Shl

impl Hash for ShlEq

impl Hash for Shr

impl Hash for ShrEq

impl Hash for Star

impl Hash for Sub

impl Hash for SubEq

impl Hash for Tilde

impl Hash for Brace

impl Hash for Bracket

impl Hash for Paren

impl Hash for Group

impl Hash for Member

impl Hash for Index

impl<'a> Hash for ImplGenerics<'a>

impl<'a> Hash for TypeGenerics<'a>

impl<'a> Hash for Turbofish<'a>

impl Hash for Lifetime

impl Hash for LitStr

impl Hash for LitByteStr

impl Hash for LitByte

impl Hash for LitChar

impl Hash for LitInt

impl Hash for LitFloat

impl<T, P> Hash for Punctuated<T, P> where
    T: Hash,
    P: Hash

impl Hash for Abi

impl Hash for Arm

impl Hash for AttrStyle

impl Hash for Attribute

impl Hash for BareFnArg

impl Hash for BinOp

impl Hash for Binding

impl Hash for Block

impl Hash for ConstParam

impl Hash for Constraint

impl Hash for Data

impl Hash for DataEnum

impl Hash for DataStruct

impl Hash for DataUnion

impl Hash for DeriveInput

impl Hash for Expr

impl Hash for ExprArray

impl Hash for ExprAssign

impl Hash for ExprAsync

impl Hash for ExprAwait

impl Hash for ExprBinary

impl Hash for ExprBlock

impl Hash for ExprBox

impl Hash for ExprBreak

impl Hash for ExprCall

impl Hash for ExprCast

impl Hash for ExprClosure

impl Hash for ExprField

impl Hash for ExprForLoop

impl Hash for ExprGroup

impl Hash for ExprIf

impl Hash for ExprIndex

impl Hash for ExprLet

impl Hash for ExprLit

impl Hash for ExprLoop

impl Hash for ExprMacro

impl Hash for ExprMatch

impl Hash for ExprParen

impl Hash for ExprPath

impl Hash for ExprRange

impl Hash for ExprRepeat

impl Hash for ExprReturn

impl Hash for ExprStruct

impl Hash for ExprTry

impl Hash for ExprTuple

impl Hash for ExprType

impl Hash for ExprUnary

impl Hash for ExprUnsafe

impl Hash for ExprWhile

impl Hash for ExprYield

impl Hash for Field

impl Hash for FieldPat

impl Hash for FieldValue

impl Hash for Fields

impl Hash for FieldsNamed

impl Hash for File

impl Hash for FnArg

impl Hash for ForeignItem

impl Hash for Generics

impl Hash for ImplItem

impl Hash for Item

impl Hash for ItemConst

impl Hash for ItemEnum

impl Hash for ItemFn

impl Hash for ItemImpl

impl Hash for ItemMacro

impl Hash for ItemMacro2

impl Hash for ItemMod

impl Hash for ItemStatic

impl Hash for ItemStruct

impl Hash for ItemTrait

impl Hash for ItemType

impl Hash for ItemUnion

impl Hash for ItemUse

impl Hash for Label

impl Hash for LifetimeDef

impl Hash for Lit

impl Hash for LitBool

impl Hash for Local

impl Hash for Macro

impl Hash for Meta

impl Hash for MetaList

impl Hash for NestedMeta

impl Hash for Pat

impl Hash for PatBox

impl Hash for PatIdent

impl Hash for PatLit

impl Hash for PatMacro

impl Hash for PatOr

impl Hash for PatPath

impl Hash for PatRange

impl Hash for PatRest

impl Hash for PatSlice

impl Hash for PatStruct

impl Hash for PatTuple

impl Hash for PatType

impl Hash for PatWild

impl Hash for Path

impl Hash for PathSegment

impl Hash for PredicateEq

impl Hash for QSelf

impl Hash for RangeLimits

impl Hash for Receiver

impl Hash for ReturnType

impl Hash for Signature

impl Hash for Stmt

impl Hash for TraitBound

impl Hash for TraitItem

impl Hash for Type

impl Hash for TypeArray

impl Hash for TypeBareFn

impl Hash for TypeGroup

impl Hash for TypeInfer

impl Hash for TypeMacro

impl Hash for TypeNever

impl Hash for TypeParam

impl Hash for TypeParen

impl Hash for TypePath

impl Hash for TypePtr

impl Hash for TypeSlice

impl Hash for TypeTuple

impl Hash for UnOp

impl Hash for UseGlob

impl Hash for UseGroup

impl Hash for UseName

impl Hash for UsePath

impl Hash for UseRename

impl Hash for UseTree

impl Hash for Variadic

impl Hash for Variant

impl Hash for VisCrate

impl Hash for VisPublic

impl Hash for Visibility

impl Hash for WhereClause

impl Hash for AddBounds

impl Hash for BindStyle

impl<'a> Hash for BindingInfo<'a>

impl<'a> Hash for VariantAst<'a>

impl<'a> Hash for VariantInfo<'a>

impl<'a> Hash for Structure<'a>

impl Hash for Size

impl Hash for CDataModel

impl Hash for Vendor

impl Hash for Environment

impl Hash for Endianness

impl Hash for Triple

impl Hash for Duration

impl Hash for Timespec

impl Hash for Tm

impl<A: Array> Hash for ArrayVec<A> where
    A::Item: Hash

impl<'s, T> Hash for SliceVec<'s, T> where
    T: Hash

impl<A: Array> Hash for TinyVec<A> where
    A::Item: Hash

impl Hash for Instant

impl Hash for BytesCodec

impl Hash for LinesCodec

impl<T: Hash> Hash for AllowStdIo<T>

impl Hash for UCred

impl Hash for BytesCodec

impl Hash for LinesCodec

impl<T: Hash> Hash for Spanned<T>

impl Hash for Span

impl Hash for Identifier

impl Hash for Field

impl Hash for Id

impl Hash for B0

impl Hash for B1

impl<U: Hash + Unsigned + NonZero> Hash for PInt<U>

impl<U: Hash + Unsigned + NonZero> Hash for NInt<U>

impl Hash for Z0

impl Hash for UTerm

impl<U: Hash, B: Hash> Hash for UInt<U, B>

impl Hash for ATerm

impl<V: Hash, A: Hash> Hash for TArr<V, A>

impl Hash for Greater

impl Hash for Less

impl Hash for Equal

impl<S: AsRef<str>> Hash for Ascii<S>

impl<S: AsRef<str>> Hash for UniCase<S>

impl<S: Hash> Hash for Host<S>

impl Hash for Origin

impl Hash for Url

impl<V: Hash> Hash for VecMap<V>

impl Hash for Range

impl<'a> Hash for BinaryReader<'a>

impl Hash for Type

impl Hash for FuncType

impl Hash for Ieee32

impl Hash for Ieee64

impl Hash for V128

impl Hash for TrapCode

impl Hash for Mutability

impl Hash for Limits

impl Hash for ValType

impl Hash for FuncType

impl Hash for GlobalType

impl Hash for TableType

impl Hash for MemoryType

impl Hash for MemoryStyle

impl Hash for MemoryPlan

impl Hash for TableStyle

impl Hash for TablePlan

impl Hash for Tunables

impl Hash for Compiler

impl Hash for Span

impl<'a> Hash for Id<'a>

impl Hash for Index<'_>

impl Hash for ExportKind

impl<'a> Hash for ValType<'a>

impl<'a> Hash for HeapType<'a>

impl<'a> Hash for RefType<'a>

impl<'a> Hash for StorageType<'a>

impl<'a> Hash for GlobalType<'a>

impl Hash for Limits

impl Hash for Limits64

impl<'a> Hash for TableType<'a>

impl Hash for MemoryType

impl Hash for DNSName

impl Hash for PublicKey

impl Hash for StreamId

impl Hash for Packet

impl Hash for Mode