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
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)].
Violating this property is a logic error. The behavior resulting from a logic error is not
specified, but users of the trait must ensure that such logic errors do not result in
undefined behavior. This means that unsafe code must not rely on the correctness of these
methods.
§Prefix collisions
Implementations of hash should ensure that the data they
pass to the Hasher are prefix-free. That is,
values which are not equal 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§
Provided Methods§
1.3.0 · Sourcefn hash_slice<H>(data: &[Self], state: &mut H)
fn hash_slice<H>(data: &[Self], state: &mut H)
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::hash::{DefaultHasher, 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());Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl Hash for FileLeaseType
impl Hash for IptIpFlags
impl Hash for starnix_uapi::resource_limits::Resource
impl Hash for SyslogAction
impl Hash for AsciiChar
impl Hash for starnix_uapi::arch32::__static_assertions::_core::cmp::Ordering
impl Hash for Infallible
impl Hash for IpAddr
impl Hash for Ipv6MulticastScope
impl Hash for SocketAddr
impl Hash for IntErrorKind
impl Hash for starnix_uapi::arch32::__static_assertions::_core::sync::atomic::Ordering
impl Hash for std::io::error::ErrorKind
impl Hash for Colons
impl Hash for Fixed
impl Hash for Numeric
impl Hash for OffsetPrecision
impl Hash for Pad
impl Hash for ParseErrorKind
impl Hash for SecondsFormat
impl Hash for Month
impl Hash for Weekday
impl Hash for Level
impl Hash for LevelFilter
impl Hash for Value
impl Hash for Origin
impl Hash for zerocopy::byteorder::BigEndian
impl Hash for zerocopy::byteorder::LittleEndian
impl Hash for bool
impl Hash for char
impl Hash for i8
impl Hash for i16
impl Hash for i32
impl Hash for i64
impl Hash for i128
impl Hash for isize
impl Hash for !
impl Hash for str
impl Hash for u8
impl Hash for u16
impl Hash for u32
impl Hash for u64
impl Hash for u128
impl Hash for ()
impl Hash for usize
impl Hash for PtraceAccessMode
impl Hash for SecureBits
impl Hash for Access
impl Hash for InotifyMask
impl Hash for IptIpFlagsV4
impl Hash for IptIpFlagsV6
impl Hash for IptIpInverseFlags
impl Hash for NfIpHooks
impl Hash for NfNatRangeFlags
impl Hash for XtTcpInverseFlags
impl Hash for XtUdpInverseFlags
impl Hash for MountFlags
impl Hash for starnix_uapi::open_flags::OpenFlags
impl Hash for PersonalityFlags
impl Hash for SealFlags
impl Hash for Signal
impl Hash for uaddr32
impl Hash for uaddr
impl Hash for UnmountFlags
impl Hash for UserAddress32
impl Hash for UserAddress
impl Hash for FdEvents
impl Hash for ResolveFlags
impl Hash for Layout
impl Hash for TypeId
impl Hash for ByteStr
impl Hash for CStr
impl Hash for starnix_uapi::arch32::__static_assertions::_core::fmt::Error
impl Hash for PhantomPinned
impl Hash for Ipv4Addr
impl Hash for Ipv6Addr
impl Hash for SocketAddrV4
impl Hash for SocketAddrV6
impl Hash for RangeFull
impl Hash for Location<'_>
impl Hash for Alignment
impl Hash for starnix_uapi::arch32::__static_assertions::_core::time::Duration
impl Hash for ByteString
impl Hash for CString
impl Hash for String
impl Hash for OsStr
impl Hash for OsString
impl Hash for FileType
impl Hash for std::path::Path
impl Hash for PathBuf
impl Hash for PrefixComponent<'_>
impl Hash for ThreadId
impl Hash for std::time::Instant
impl Hash for SystemTime
impl Hash for Parsed
impl Hash for InternalFixed
impl Hash for InternalNumeric
impl Hash for OffsetFormat
impl Hash for chrono::format::ParseError
impl Hash for Months
impl Hash for NaiveDate
impl Hash for NaiveDateDaysIterator
impl Hash for NaiveDateWeeksIterator
impl Hash for NaiveDateTime
impl Hash for IsoWeek
impl Hash for Days
impl Hash for NaiveWeek
impl Hash for NaiveTime
impl Hash for FixedOffset
impl Hash for Utc
impl Hash for OutOfRange
impl Hash for TimeDelta
impl Hash for WeekdaySet
impl Hash for Map<String, Value>
impl Hash for Number
impl Hash for OpaqueOrigin
impl Hash for url::Url
URLs hash like their serialization.
impl Hash for BStr
impl Hash for BString
impl Hash for BugRef
impl Hash for Status
impl Hash for PadByte
impl Hash for AddressTaggingFeatureFlags
impl Hash for AdvisoryLockRange
impl Hash for AdvisoryLockType
impl Hash for AdvisoryLockingMarker
impl Hash for All
impl Hash for AllocateMode
impl Hash for AllowedOffers
impl Hash for ArchiveAccessorMarker
impl Hash for AtRestFlags
impl Hash for AtomicFutureHandle<'static>
impl Hash for Availability
impl Hash for Availability
impl Hash for Availability
impl Hash for BatchIteratorMarker
impl Hash for BigEndian
impl Hash for BinderMarker
impl Hash for BlockIndex
impl Hash for BootControllerMarker
impl Hash for BootInstant
impl Hash for BootTimeline
impl Hash for BorrowedChildName
impl Hash for Bti
impl Hash for Bti
impl Hash for BtiOptions
impl Hash for Buffer
impl Hash for CapabilityRef
impl Hash for CapabilityStoreConnectorCreateRequest
impl Hash for CapabilityStoreConnectorOpenRequest
impl Hash for CapabilityStoreDictionaryCopyRequest
impl Hash for CapabilityStoreDictionaryCreateRequest
impl Hash for CapabilityStoreDictionaryDrainRequest
impl Hash for CapabilityStoreDictionaryEnumerateRequest
impl Hash for CapabilityStoreDictionaryGetRequest
impl Hash for CapabilityStoreDictionaryInsertRequest
impl Hash for CapabilityStoreDictionaryKeysRequest
impl Hash for CapabilityStoreDictionaryLegacyExportRequest
impl Hash for CapabilityStoreDictionaryLegacyImportRequest
impl Hash for CapabilityStoreDictionaryRemoveRequest
impl Hash for CapabilityStoreDirConnectorCreateRequest
impl Hash for CapabilityStoreDropRequest
impl Hash for CapabilityStoreDuplicateRequest
impl Hash for CapabilityStoreError
impl Hash for CapabilityStoreExportRequest
impl Hash for CapabilityStoreMarker
impl Hash for CapabilityTypeName
impl Hash for Channel
impl Hash for ChildIteratorMarker
impl Hash for ChildName
impl Hash for ChildRef
impl Hash for ChildRef
impl Hash for ClockOpts
impl Hash for CloneableCloneRequest
impl Hash for CloneableMarker
impl Hash for CloseableMarker
impl Hash for CollectionRef
impl Hash for ComponentControllerMarker
impl Hash for ComponentRunnerMarker
impl Hash for ConfigMutability
impl Hash for ConfigMutability
impl Hash for ConfigOverrideError
impl Hash for ConfigOverrideMarker
impl Hash for ConfigOverrideUnsetStructuredConfigRequest
impl Hash for ConfigTypeLayout
impl Hash for ConfigurationError
impl Hash for ConnectToStorageAdminError
impl Hash for Connector
impl Hash for ConnectorRouterMarker
impl Hash for ConnectorRouterRouteResponse
impl Hash for ConstructNamespaceError
impl Hash for Context
impl Hash for ControllerIsStartedResponse
impl Hash for ControllerMarker
impl Hash for ControllerOpenExposedDirRequest
impl Hash for Counter
impl Hash for CpuFeatureFlags
impl Hash for CrashIntrospectFindComponentByThreadKoidRequest
impl Hash for CrashIntrospectMarker
impl Hash for CreateError
impl Hash for DataRouterMarker
impl Hash for DataType
impl Hash for DebugLog
impl Hash for DebugLogOpts
impl Hash for DebugRef
impl Hash for DeclType
impl Hash for DeletionError
impl Hash for DeletionError
impl Hash for DeliveryType
impl Hash for DeliveryType
impl Hash for DependencyNode
impl Hash for DependencyType
impl Hash for DestroyError
impl Hash for DictionaryDrainIteratorGetNextRequest
impl Hash for DictionaryDrainIteratorGetNextResponse
impl Hash for DictionaryDrainIteratorMarker
impl Hash for DictionaryEnumerateIteratorGetNextRequest
impl Hash for DictionaryEnumerateIteratorGetNextResponse
impl Hash for DictionaryEnumerateIteratorMarker
impl Hash for DictionaryError
impl Hash for DictionaryItem
impl Hash for DictionaryKeysIteratorGetNextResponse
impl Hash for DictionaryKeysIteratorMarker
impl Hash for DictionaryMarker
impl Hash for DictionaryOptionalItem
impl Hash for DictionaryRef
impl Hash for DictionaryRouterMarker
impl Hash for DictionaryRouterRouteResponse
impl Hash for DictionaryValue
impl Hash for DirConnector
impl Hash for DirConnectorRouterMarker
impl Hash for DirConnectorRouterRouteResponse
impl Hash for DirEntry
impl Hash for DirEntryRouterMarker
impl Hash for DirEntryRouterRouteResponse
impl Hash for DirReceiverMarker
impl Hash for DirectoryCreateSymlinkRequest
impl Hash for DirectoryDeprecatedOpenRequest
impl Hash for DirectoryGetTokenResponse
impl Hash for DirectoryLinkRequest
impl Hash for DirectoryLinkResponse
impl Hash for DirectoryMarker
impl Hash for DirectoryObject
impl Hash for DirectoryReadDirentsRequest
impl Hash for DirectoryReadDirentsResponse
impl Hash for DirectoryRenameRequest
impl Hash for DirectoryRewindResponse
impl Hash for DirectoryRouterMarker
impl Hash for DirectoryRouterRouteResponse
impl Hash for DirectoryWatchRequest
impl Hash for DirectoryWatchResponse
impl Hash for DirectoryWatcherMarker
impl Hash for DirentType
impl Hash for Dl_info
impl Hash for Durability
impl Hash for DynamicFlags
impl Hash for Elf32_Phdr
impl Hash for Elf64_Phdr
impl Hash for EmptyStruct
impl Hash for EnvironmentExtends
impl Hash for EnvironmentRef
impl Hash for Error
impl Hash for ErrorKind
impl Hash for EscrowToken
impl Hash for Event
impl Hash for EventPair
impl Hash for EventScope
impl Hash for EventStreamMarker
impl Hash for EventType
impl Hash for Exception
impl Hash for Exception
impl Hash for ExceptionChannelOptions
impl Hash for ExecutionControllerMarker
impl Hash for ExposeTarget
impl Hash for ExtendedAttributeIteratorGetNextResponse
impl Hash for ExtendedAttributeIteratorMarker
impl Hash for ExtendedMoniker
impl Hash for FileAllocateRequest
impl Hash for FileGetBackingMemoryRequest
impl Hash for FileGetBackingMemoryResponse
impl Hash for FileMarker
impl Hash for FileObject
impl Hash for FileReadAtRequest
impl Hash for FileReadAtResponse
impl Hash for FileResizeRequest
impl Hash for FileSeekRequest
impl Hash for FileSeekResponse
impl Hash for FileSignal
impl Hash for FileWriteAtRequest
impl Hash for FileWriteAtResponse
impl Hash for FilesystemInfo
impl Hash for Flags
impl Hash for FlyByteStr
impl Hash for FlyStr
impl Hash for Format
impl Hash for FrameworkErr
impl Hash for FrameworkRef
impl Hash for GPAddr
impl Hash for GetAllInstancesError
impl Hash for GetDeclarationError
impl Hash for GetInstanceError
impl Hash for GetStructuredConfigError
impl Hash for Guest
impl Hash for Handle
impl Hash for HandleInfo
impl Hash for HandleInfo
impl Hash for HashAlgorithm
impl Hash for InspectSinkMarker
impl Hash for InstanceIteratorMarker
impl Hash for InstanceToken
impl Hash for InstanceType
impl Hash for IntrospectorGetMonikerRequest
impl Hash for IntrospectorGetMonikerResponse
impl Hash for IntrospectorMarker
impl Hash for Iob
impl Hash for IobAccess
impl Hash for Iommu
impl Hash for Iommu
impl Hash for Job
impl Hash for JobCriticalOptions
impl Hash for Koid
impl Hash for LaunchInfo
impl Hash for LauncherAddArgsRequest
impl Hash for LauncherAddEnvironsRequest
impl Hash for LauncherAddHandlesRequest
impl Hash for LauncherAddNamesRequest
impl Hash for LauncherCreateWithoutStartingRequest
impl Hash for LauncherCreateWithoutStartingResponse
impl Hash for LauncherLaunchRequest
impl Hash for LauncherLaunchResponse
impl Hash for LauncherMarker
impl Hash for LauncherSetOptionsRequest
impl Hash for LifecycleControllerMarker
impl Hash for LifecycleControllerResolveInstanceRequest
impl Hash for LifecycleControllerStartInstanceRequest
impl Hash for LifecycleControllerStopInstanceRequest
impl Hash for LifecycleControllerUnresolveInstanceRequest
impl Hash for LinkableLinkIntoRequest
impl Hash for LinkableMarker
impl Hash for LittleEndian
impl Hash for LoaderCloneRequest
impl Hash for LoaderCloneResponse
impl Hash for LoaderConfigRequest
impl Hash for LoaderConfigResponse
impl Hash for LoaderLoadObjectRequest
impl Hash for LoaderLoadObjectResponse
impl Hash for LoaderMarker
impl Hash for LogFlusherMarker
impl Hash for LogSettingsMarker
impl Hash for LogStreamMarker
impl Hash for ManifestBytesIteratorMarker
impl Hash for ManifestBytesIteratorNextResponse
impl Hash for MemoryStallKind
impl Hash for ModeType
impl Hash for Moniker
impl Hash for MonotonicInstant
impl Hash for MonotonicTimeline
impl Hash for Msi
impl Hash for Name
impl Hash for Name
impl Hash for NameInfo
impl Hash for NameMapping
impl Hash for NamespaceCreateRequest
impl Hash for NamespaceError
impl Hash for NamespaceInputEntry
impl Hash for NamespaceMarker
impl Hash for NamespacePath
impl Hash for NodeAttributeFlags
impl Hash for NodeAttributes
impl Hash for NodeAttributesQuery
impl Hash for NodeDeprecatedCloneRequest
impl Hash for NodeDeprecatedGetAttrResponse
impl Hash for NodeDeprecatedGetFlagsResponse
impl Hash for NodeDeprecatedSetAttrRequest
impl Hash for NodeDeprecatedSetAttrResponse
impl Hash for NodeDeprecatedSetFlagsRequest
impl Hash for NodeDeprecatedSetFlagsResponse
impl Hash for NodeGetAttributesRequest
impl Hash for NodeGetExtendedAttributeRequest
impl Hash for NodeGetFlagsResponse
impl Hash for NodeInfoDeprecated
impl Hash for NodeListExtendedAttributesRequest
impl Hash for NodeMarker
impl Hash for NodeOnOpenRequest
impl Hash for NodeProtocolKinds
impl Hash for NodeQueryFilesystemResponse
impl Hash for NodeRemoveExtendedAttributeRequest
impl Hash for NodeSetFlagsRequest
impl Hash for NsUnit
impl Hash for NullableHandle
impl Hash for ObjectType
impl Hash for OfferTarget
impl Hash for OnTerminate
impl Hash for OpenDirType
impl Hash for OpenError
impl Hash for OpenFlags
impl Hash for Operations
impl Hash for Pager
impl Hash for Pager
impl Hash for PagerOptions
impl Hash for PagerWritebackBeginOptions
impl Hash for ParentRef
impl Hash for ParseError
impl Hash for Path
impl Hash for PciDevice
impl Hash for Pmt
impl Hash for Pmt
impl Hash for PollNext
impl Hash for Port
impl Hash for Process
impl Hash for ProcessInfoFlags
impl Hash for ProcessOptions
impl Hash for ProcessStartData
impl Hash for Profile
impl Hash for Property
impl Hash for ProtocolPayload
impl Hash for QueryableMarker
impl Hash for QueryableQueryResponse
impl Hash for RaiseExceptionOptions
impl Hash for Range
impl Hash for ReadableMarker
impl Hash for ReadableReadRequest
impl Hash for ReadableReadResponse
impl Hash for ReaderError
impl Hash for RealInterruptKind
impl Hash for RealmExplorerMarker
impl Hash for RealmMarker
impl Hash for RealmQueryConnectToStorageAdminRequest
impl Hash for RealmQueryConstructNamespaceRequest
impl Hash for RealmQueryError
impl Hash for RealmQueryGetAllInstancesResponse
impl Hash for RealmQueryGetInstanceRequest
impl Hash for RealmQueryGetResolvedDeclarationRequest
impl Hash for RealmQueryGetResolvedDeclarationResponse
impl Hash for RealmQueryGetStructuredConfigRequest
impl Hash for RealmQueryMarker
impl Hash for RealmQueryOpenDirectoryRequest
impl Hash for RealmQueryResolveDeclarationResponse
impl Hash for ReceiverMarker
impl Hash for RelativePath
impl Hash for ResolveError
impl Hash for ResolverError
impl Hash for ResolverMarker
impl Hash for ResolverMarker
impl Hash for ResolverResolveRequest
impl Hash for ResolverResolveRequest
impl Hash for ResolverResolveResponse
impl Hash for ResolverResolveWithContextRequest
impl Hash for Resource
impl Hash for ResourceFlag
impl Hash for ResourceKind
impl Hash for Rights
impl Hash for RouteOutcome
impl Hash for RouteTarget
impl Hash for RouteValidatorError
impl Hash for RouteValidatorMarker
impl Hash for RouteValidatorRouteRequest
impl Hash for RouteValidatorValidateRequest
impl Hash for RouterError
impl Hash for RuntimeError
impl Hash for SampleCommitRequest
impl Hash for SampleMarker
impl Hash for SampleSinkMarker
impl Hash for SampleStrategy
impl Hash for SeekOrigin
impl Hash for SelfRef
impl Hash for Service
impl Hash for SetExtendedAttributeMode
impl Hash for Severity
impl Hash for Severity
impl Hash for Signals
impl Hash for SockAddr
impl Hash for Socket
impl Hash for SocketOpts
impl Hash for SocketReadOpts
impl Hash for SocketWriteOpts
impl Hash for StartError
impl Hash for StartupMode
impl Hash for StatusError
impl Hash for StatusError
impl Hash for StopError
impl Hash for StorageAdminDeleteComponentStorageRequest
impl Hash for StorageAdminDeleteComponentStorageRequest
impl Hash for StorageAdminListStorageInRealmRequest
impl Hash for StorageAdminListStorageInRealmRequest
impl Hash for StorageAdminMarker
impl Hash for StorageAdminMarker
impl Hash for StorageAdminOpenComponentStorageByIdRequest
impl Hash for StorageAdminOpenComponentStorageByIdRequest
impl Hash for StorageAdminOpenStorageRequest
impl Hash for StorageAdminOpenStorageRequest
impl Hash for StorageId
impl Hash for StorageIteratorMarker
impl Hash for StorageIteratorMarker
impl Hash for StorageIteratorNextResponse
impl Hash for StorageIteratorNextResponse
impl Hash for Stream
impl Hash for StreamMode
impl Hash for StreamOptions
impl Hash for StreamReadOptions
impl Hash for StreamWriteOptions
impl Hash for StringReference
impl Hash for SuspendToken
impl Hash for SymlinkMarker
impl Hash for SymlinkObject
impl Hash for SyntheticTimeline
impl Hash for SystemControllerMarker
impl Hash for TaskProviderGetJobResponse
impl Hash for TaskProviderMarker
impl Hash for Thread
impl Hash for TicksUnit
impl Hash for Topic
impl Hash for TransferDataOptions
impl Hash for TreeListChildNamesRequest
impl Hash for TreeMarker
impl Hash for TreeNameIteratorGetNextResponse
impl Hash for TreeNameIteratorMarker
impl Hash for TreeOpenChildRequest
impl Hash for Unit
impl Hash for UnlinkFlags
impl Hash for UnresolveError
impl Hash for Url
impl Hash for UrlScheme
impl Hash for UseEventStreamDecl
impl Hash for UseSource
impl Hash for UtcTimeline
impl Hash for Vcpu
impl Hash for VirtualInterruptKind
impl Hash for VirtualMemoryFeatureFlags
impl Hash for Vmar
impl Hash for VmarFlags
impl Hash for VmarFlagsExtended
impl Hash for VmarOp
impl Hash for Vmo
impl Hash for VmoChildOptions
impl Hash for VmoFlags
impl Hash for VmoInfoFlags
impl Hash for VmoOp
impl Hash for VmoOptions
impl Hash for VoidRef
impl Hash for WaitAsyncOpts
impl Hash for WaitResult
impl Hash for WatchEvent
impl Hash for WatchMask
impl Hash for WrappedCapabilityId
impl Hash for WritableMarker
impl Hash for WritableWriteRequest
impl Hash for WritableWriteResponse
impl Hash for addrinfo
impl Hash for aiocb
impl Hash for cmsghdr
impl Hash for cpu_set_t
impl Hash for dirent
extra_traits only.impl Hash for dirent64
extra_traits only.impl Hash for dl_phdr_info
impl Hash for dqblk
impl Hash for epoll_event
impl Hash for fd_set
impl Hash for ff_condition_effect
impl Hash for ff_constant_effect
impl Hash for ff_effect
impl Hash for ff_envelope
impl Hash for ff_periodic_effect
impl Hash for ff_ramp_effect
impl Hash for ff_replay
impl Hash for ff_rumble_effect
impl Hash for ff_trigger
impl Hash for flock
impl Hash for fsid_t
impl Hash for glob_t
impl Hash for group
impl Hash for hostent
impl Hash for if_nameindex
impl Hash for ifaddrs
impl Hash for in6_addr
impl Hash for in6_pktinfo
impl Hash for in_addr
impl Hash for input_absinfo
impl Hash for input_event
impl Hash for input_id
impl Hash for input_keymap_entry
impl Hash for input_mask
impl Hash for iovec
impl Hash for ip_mreq
impl Hash for ip_mreqn
impl Hash for ipc_perm
impl Hash for ipv6_mreq
impl Hash for itimerspec
impl Hash for itimerval
impl Hash for lconv
impl Hash for linger
impl Hash for mcontext_t
impl Hash for mmsghdr
impl Hash for mq_attr
extra_traits only.impl Hash for msghdr
impl Hash for msginfo
impl Hash for msqid_ds
impl Hash for passwd
impl Hash for pollfd
impl Hash for protoent
impl Hash for pthread_attr_t
impl Hash for pthread_cond_t
extra_traits only.impl Hash for pthread_condattr_t
impl Hash for pthread_mutex_t
extra_traits only.impl Hash for pthread_mutexattr_t
impl Hash for pthread_rwlock_t
extra_traits only.impl Hash for pthread_rwlockattr_t
impl Hash for rlimit
impl Hash for rlimit64
impl Hash for rusage
impl Hash for sched_param
impl Hash for sem_t
impl Hash for sembuf
impl Hash for servent
impl Hash for shmid_ds
impl Hash for sigaction
impl Hash for sigevent
extra_traits only.impl Hash for siginfo_t
impl Hash for signalfd_siginfo
impl Hash for sigset_t
impl Hash for sigval
impl Hash for sockaddr
impl Hash for sockaddr_in
impl Hash for sockaddr_in6
impl Hash for sockaddr_ll
impl Hash for sockaddr_nl
extra_traits only.impl Hash for sockaddr_storage
extra_traits only.impl Hash for sockaddr_un
extra_traits only.impl Hash for sockaddr_vm
impl Hash for spwd
impl Hash for stack_t
impl Hash for stat
impl Hash for stat64
impl Hash for statfs
impl Hash for statfs64
impl Hash for statvfs
impl Hash for statvfs64
impl Hash for sysinfo
extra_traits only.impl Hash for termios
impl Hash for termios2
impl Hash for timespec
impl Hash for timeval
impl Hash for tm
impl Hash for tms
impl Hash for ucontext_t
extra_traits only.impl Hash for ucred
impl Hash for utimbuf
impl Hash for utsname
extra_traits only.impl Hash for winsize
impl<'a> Hash for Component<'a>
impl<'a> Hash for Prefix<'a>
impl<'a> Hash for Item<'a>
impl<'a> Hash for PhantomContravariantLifetime<'a>
impl<'a> Hash for PhantomCovariantLifetime<'a>
impl<'a> Hash for PhantomInvariantLifetime<'a>
impl<'a> Hash for Metadata<'a>
impl<'a> Hash for MetadataBuilder<'a>
impl<'a> Hash for ChannelIoSlice<'a>
impl<'a> Hash for HandleDisposition<'a>
impl<'a> Hash for HandleOp<'a>
impl<'a> Hash for IobIoSlice<'a>
impl<'a, T> Hash for Unowned<'a, T>
impl<'k> Hash for Key<'k>
impl<'s, T> Hash for SliceVec<'s, T>where
T: Hash,
impl<A> Hash for ArrayVec<A>where
A: Array,
<A as Array>::Item: Hash,
impl<A> Hash for SmallVec<A>where
A: Array,
<A as Array>::Item: Hash,
impl<A> Hash for TinyVec<A>where
A: Array,
<A as Array>::Item: Hash,
impl<A, B> Hash for EitherOrBoth<A, B>
impl<B> Hash for Cow<'_, B>
impl<B, C> Hash for ControlFlow<B, C>
impl<Dyn> Hash for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<F> Hash for Fwhere
F: FnPtr,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::Range<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeFrom<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeInclusive<Idx>where
Idx: Hash,
impl<Idx> Hash for RangeTo<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeToInclusive<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::Range<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeFrom<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeInclusive<Idx>where
Idx: Hash,
impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeToInclusive<Idx>where
Idx: Hash,
impl<K, T> Hash for Interrupt<K, T>
impl<K, V, A> Hash for BTreeMap<K, V, A>
impl<L, R> Hash for Either<L, R>
impl<O> Hash for F32<O>where
O: Hash,
impl<O> Hash for F64<O>where
O: Hash,
impl<O> Hash for I16<O>where
O: Hash,
impl<O> Hash for I32<O>where
O: Hash,
impl<O> Hash for I64<O>where
O: Hash,
impl<O> Hash for I128<O>where
O: Hash,
impl<O> Hash for Isize<O>where
O: Hash,
impl<O> Hash for U16<O>where
O: Hash,
impl<O> Hash for U32<O>where
O: Hash,
impl<O> Hash for U64<O>where
O: Hash,
impl<O> Hash for U128<O>where
O: Hash,
impl<O> Hash for Usize<O>where
O: Hash,
impl<Ptr> Hash for Pin<Ptr>
impl<R, W> Hash for Fifo<R, W>
impl<Reference, Output> Hash for Clock<Reference, Output>
impl<S> Hash for Host<S>where
S: Hash,
impl<Storage> Hash for __BindgenBitfieldUnit<Storage>where
Storage: Hash,
impl<T> Hash for Bound<T>where
T: Hash,
impl<T> Hash for Option<T>where
T: Hash,
impl<T> Hash for Poll<T>where
T: Hash,
impl<T> Hash for LocalResult<T>where
T: Hash,
impl<T> Hash for *const Twhere
T: ?Sized,
impl<T> Hash for *mut Twhere
T: ?Sized,
impl<T> Hash for &T
impl<T> Hash for &mut T
impl<T> Hash for [T]where
T: Hash,
impl<T> Hash for (T₁, T₂, …, Tₙ)where
T: Hash,
This trait is implemented for tuples up to twelve items long.
impl<T> Hash for ArcKey<T>
impl<T> Hash for PtrKey<T>
impl<T> Hash for WeakKey<T>
impl<T> Hash for __BindgenOpaqueArray8<T>where
T: Hash,
impl<T> Hash for __BindgenUnionField<T>
impl<T> Hash for uref32<T>where
T: Hash,
impl<T> Hash for uref<T>where
T: Hash,
impl<T> Hash for Reverse<T>where
T: Hash,
impl<T> Hash for PhantomContravariant<T>where
T: ?Sized,
impl<T> Hash for PhantomCovariant<T>where
T: ?Sized,
impl<T> Hash for PhantomData<T>where
T: ?Sized,
impl<T> Hash for PhantomInvariant<T>where
T: ?Sized,
impl<T> Hash for Discriminant<T>
impl<T> Hash for ManuallyDrop<T>
impl<T> Hash for NonZero<T>where
T: ZeroablePrimitive + Hash,
impl<T> Hash for Saturating<T>where
T: Hash,
impl<T> Hash for Wrapping<T>where
T: Hash,
impl<T> Hash for NonNull<T>where
T: ?Sized,
impl<T> Hash for Exclusive<T>
impl<T> Hash for Unalign<T>
impl<T> Hash for AllowStdIo<T>where
T: Hash,
impl<T> Hash for CachePadded<T>where
T: Hash,
impl<T> Hash for ClientEnd<T>where
T: Hash,
impl<T> Hash for ServerEnd<T>where
T: Hash,
impl<T> Hash for Timer<T>where
T: Hash,
impl<T, A> Hash for Box<T, A>
impl<T, A> Hash for BTreeSet<T, A>
impl<T, A> Hash for LinkedList<T, A>
impl<T, A> Hash for VecDeque<T, A>
impl<T, A> Hash for Rc<T, A>
impl<T, A> Hash for UniqueRc<T, A>
impl<T, A> Hash for Arc<T, A>
impl<T, A> Hash for UniqueArc<T, A>
impl<T, A> Hash for Vec<T, A>
The hash of a vector is the same as that of the corresponding slice,
as required by the core::borrow::Borrow implementation.
use std::hash::BuildHasher;
let b = std::hash::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<T, E> Hash for Result<T, E>
impl<T, U> Hash for Duration<T, U>
impl<T, U> Hash for Instant<T, U>
impl<T, const CAP: usize> Hash for arrayvec::arrayvec::ArrayVec<T, CAP>where
T: Hash,
impl<T, const N: usize> Hash for [T; N]where
T: Hash,
The hash of an array is the same as that of the corresponding slice,
as required by the Borrow implementation.
use std::hash::BuildHasher;
let b = std::hash::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));