Skip to main content

Hash

Trait Hash 

1.6.0 · 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

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§

1.0.0 · Source

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

Feeds this value into the given Hasher.

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

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

Provided Methods§

1.3.0 · Source

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

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".

Implementors§

1.29.0 · Source§

impl Hash for !

1.0.0 · Source§

impl Hash for ()

Source§

impl Hash for Access

§

impl Hash for AddressTaggingFeatureFlags

§

impl Hash for AdvisoryLockRange

§

impl Hash for AdvisoryLockType

§

impl Hash for AdvisoryLockingMarker

Source§

impl Hash for Alignment

§

impl Hash for All

§

impl Hash for AllocateMode

§

impl Hash for AllowedOffers

Source§

impl Hash for AsciiChar

§

impl Hash for AtRestFlags

§

impl Hash for AtomicFutureHandle<'_>

§

impl Hash for Availability

§

impl Hash for Availability

§

impl Hash for Availability

Source§

impl Hash for bstr::bstr::BStr

§

impl Hash for BStr

Source§

impl Hash for BString

Source§

impl Hash for zerocopy::byteorder::BigEndian

§

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 BtiOptions

§

impl Hash for Buffer

Source§

impl Hash for BugRef

Source§

impl Hash for ByteStr

Source§

impl Hash for ByteString

§

impl Hash for Bytes

1.64.0 · Source§

impl Hash for CStr

1.64.0 · Source§

impl Hash for CString

Source§

impl Hash for Capabilities

§

impl Hash for CapabilityRef

§

impl Hash for CapabilityStoreConnectorCreateRequest

§

impl Hash for CapabilityStoreConnectorOpenRequest

§

impl Hash for CapabilityStoreCreateServiceAggregateResponse

§

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

Source§

impl Hash for CharCase

§

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

Source§

impl Hash for Colons

§

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 ControllerGetOutputDictionaryResponse

§

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

Source§

impl Hash for Days

§

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

1.3.0 · Source§

impl Hash for starnix_uapi::arch32::__static_assertions::_core::time::Duration

§

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

1.0.0 · Source§

impl Hash for starnix_uapi::arch32::__static_assertions::_core::fmt::Error

§

impl Hash for Error

1.0.0 · Source§

impl Hash for ErrorKind

Source§

impl Hash for ErrorStatus

§

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 ExceptionChannelOptions

§

impl Hash for ExecutionControllerMarker

§

impl Hash for ExposeTarget

§

impl Hash for ExtendedAttributeIteratorGetNextResponse

§

impl Hash for ExtendedAttributeIteratorMarker

§

impl Hash for ExtendedMoniker

Source§

impl Hash for FdEvents

Source§

impl Hash for FieldId

§

impl Hash for FileAllocateRequest

§

impl Hash for FileGetBackingMemoryRequest

§

impl Hash for FileGetBackingMemoryResponse

Source§

impl Hash for FileLeaseType

§

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

1.1.0 · Source§

impl Hash for FileType

§

impl Hash for FileWriteAtRequest

§

impl Hash for FileWriteAtResponse

§

impl Hash for FilesystemInfo

Source§

impl Hash for Fixed

Source§

impl Hash for FixedOffset

§

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 HandleType

§

impl Hash for HashAlgorithm

1.44.0 · Source§

impl Hash for Infallible

Source§

impl Hash for InitialSid

Source§

impl Hash for InotifyMask

§

impl Hash for InspectSinkMarker

§

impl Hash for InstanceIteratorMarker

§

impl Hash for InstanceToken

§

impl Hash for InstanceType

1.8.0 · Source§

impl Hash for std::time::Instant

1.55.0 · Source§

impl Hash for IntErrorKind

Source§

impl Hash for InternalFixed

Source§

impl Hash for InternalNumeric

§

impl Hash for IntrospectorGetMonikerRequest

§

impl Hash for IntrospectorGetMonikerResponse

§

impl Hash for IntrospectorMarker

§

impl Hash for Iob

§

impl Hash for IobAccess

§

impl Hash for IobSharedRegion

§

impl Hash for Iommu

1.7.0 · Source§

impl Hash for IpAddr

Source§

impl Hash for IptIpFlags

Source§

impl Hash for IptIpFlagsV4

Source§

impl Hash for IptIpFlagsV6

Source§

impl Hash for IptIpInverseFlags

1.0.0 · Source§

impl Hash for Ipv4Addr

1.0.0 · Source§

impl Hash for Ipv6Addr

Source§

impl Hash for Ipv6MulticastScope

Source§

impl Hash for IsoWeek

§

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

1.28.0 · Source§

impl Hash for Layout

Source§

impl Hash for Level

Source§

impl Hash for LevelFilter

§

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

Source§

impl Hash for zerocopy::byteorder::LittleEndian

§

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

Source§

impl Hash for Locality

1.10.0 · Source§

impl Hash for Location<'_>

§

impl Hash for ManifestBytesIteratorMarker

§

impl Hash for ManifestBytesIteratorNextResponse

Source§

impl Hash for Map<String, Value>

§

impl Hash for MemoryStallKind

§

impl Hash for ModeType

§

impl Hash for Moniker

§

impl Hash for MonotonicInstant

§

impl Hash for MonotonicTimeline

Source§

impl Hash for Month

Source§

impl Hash for Months

§

impl Hash for Msi

Source§

impl Hash for NaiveDate

Source§

impl Hash for NaiveDateDaysIterator

Source§

impl Hash for NaiveDateTime

Source§

impl Hash for NaiveDateWeeksIterator

Source§

impl Hash for NaiveTime

Source§

impl Hash for NaiveWeek

§

impl Hash for Name

§

impl Hash for Name

§

impl Hash for NameInfo

§

impl Hash for NameMapping

§

impl Hash for NamespaceCreate2Request

§

impl Hash for NamespaceCreateRequest

§

impl Hash for NamespaceError

§

impl Hash for NamespaceInputEntry

§

impl Hash for NamespaceInputEntry2

§

impl Hash for NamespaceMarker

§

impl Hash for NamespacePath

Source§

impl Hash for NfIpHooks

Source§

impl Hash for NfNatRangeFlags

§

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

Source§

impl Hash for Number

Source§

impl Hash for Numeric

§

impl Hash for ObjectType

§

impl Hash for OfferTarget

Source§

impl Hash for OffsetFormat

Source§

impl Hash for OffsetPrecision

§

impl Hash for OnTerminate

Source§

impl Hash for OpaqueOrigin

§

impl Hash for OpenDirType

§

impl Hash for OpenError

§

impl Hash for OpenFlags

Source§

impl Hash for starnix_uapi::open_flags::OpenFlags

§

impl Hash for OpenableMarker

§

impl Hash for Operations

1.0.0 · Source§

impl Hash for starnix_uapi::arch32::__static_assertions::_core::cmp::Ordering

1.0.0 · Source§

impl Hash for starnix_uapi::arch32::__static_assertions::_core::sync::atomic::Ordering

Source§

impl Hash for Origin

1.0.0 · Source§

impl Hash for OsStr

1.0.0 · Source§

impl Hash for OsString

Source§

impl Hash for OutOfRange

Source§

impl Hash for Pad

Source§

impl Hash for PadByte

§

impl Hash for Pager

§

impl Hash for PagerOptions

§

impl Hash for PagerWritebackBeginOptions

§

impl Hash for ParentRef

Source§

impl Hash for chrono::format::ParseError

§

impl Hash for ParseError

Source§

impl Hash for ParseErrorKind

Source§

impl Hash for Parsed

1.0.0 · Source§

impl Hash for std::path::Path

§

impl Hash for Path

1.0.0 · Source§

impl Hash for PathBuf

§

impl Hash for PciDevice

Source§

impl Hash for PersonalityFlags

1.33.0 · Source§

impl Hash for PhantomPinned

§

impl Hash for Pmt

§

impl Hash for PollNext

§

impl Hash for Port

1.0.0 · Source§

impl Hash for PrefixComponent<'_>

§

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

Source§

impl Hash for PtraceAccessMode

§

impl Hash for QueryableMarker

§

impl Hash for QueryableQueryResponse

§

impl Hash for RaiseExceptionOptions

§

impl Hash for Range

1.0.0 · Source§

impl Hash for RangeFull

§

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 RealmGetChildOutputDictionaryResponse

§

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 RealmQueryOpenStorageAdminRequest

§

impl Hash for RealmQueryResolveDeclarationResponse

§

impl Hash for ReceiverMarker

§

impl Hash for RelativePath

§

impl Hash for ResolveError

Source§

impl Hash for ResolveFlags

§

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

Source§

impl Hash for starnix_uapi::resource_limits::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 SampleStrategy

Source§

impl Hash for SealFlags

Source§

impl Hash for SecondsFormat

Source§

impl Hash for SecureBits

Source§

impl Hash for SecurityId

§

impl Hash for SeekOrigin

§

impl Hash for SelfRef

§

impl Hash for Service

§

impl Hash for SetExtendedAttributeMode

§

impl Hash for Severity

Source§

impl Hash for Signal

§

impl Hash for Signals

§

impl Hash for SockAddr

§

impl Hash for Socket

1.0.0 · Source§

impl Hash for SocketAddr

1.0.0 · Source§

impl Hash for SocketAddrV4

1.0.0 · Source§

impl Hash for SocketAddrV6

§

impl Hash for SocketOpts

§

impl Hash for SocketReadOpts

§

impl Hash for SocketWriteOpts

§

impl Hash for StartError

§

impl Hash for StartupMode

Source§

impl Hash for Status

§

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

1.0.0 · Source§

impl Hash for String

§

impl Hash for StringReference

§

impl Hash for SuspendToken

§

impl Hash for SymlinkMarker

§

impl Hash for SymlinkObject

§

impl Hash for SyntheticTimeline

Source§

impl Hash for SyslogAction

§

impl Hash for SystemControllerMarker

1.8.0 · Source§

impl Hash for SystemTime

§

impl Hash for TaskProviderGetJobResponse

§

impl Hash for TaskProviderMarker

§

impl Hash for Thread

1.19.0 · Source§

impl Hash for ThreadId

§

impl Hash for TicksUnit

Source§

impl Hash for TimeDelta

§

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

1.0.0 · Source§

impl Hash for TypeId

§

impl Hash for Unavailable

§

impl Hash for Unit

§

impl Hash for UnlinkFlags

Source§

impl Hash for UnmountFlags

§

impl Hash for UnresolveError

§

impl Hash for Url

Source§

impl Hash for url::Url

URLs hash like their serialization.

§

impl Hash for UrlScheme

§

impl Hash for UseEventStreamDecl

§

impl Hash for UseSource

Source§

impl Hash for UserAddress

Source§

impl Hash for UserAddress32

Source§

impl Hash for Utc

§

impl Hash for UtcTimeline

Source§

impl Hash for Value

§

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

Source§

impl Hash for Weekday

Source§

impl Hash for WeekdaySet

§

impl Hash for WrappedCapabilityId

§

impl Hash for WritableMarker

§

impl Hash for WritableWriteRequest

§

impl Hash for WritableWriteResponse

Source§

impl Hash for XtTcpInverseFlags

Source§

impl Hash for XtUdpInverseFlags

§

impl Hash for addrinfo

§

impl Hash for aiocb

1.0.0 · Source§

impl Hash for bool

1.0.0 · Source§

impl Hash for char

§

impl Hash for cmsghdr

§

impl Hash for cpu_set_t

§

impl Hash for dirent

§

impl Hash for dirent64

§

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

1.0.0 · Source§

impl Hash for i8

1.0.0 · Source§

impl Hash for i16

1.0.0 · Source§

impl Hash for i32

1.0.0 · Source§

impl Hash for i64

1.0.0 · Source§

impl Hash for i128

§

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

1.0.0 · Source§

impl Hash for isize

§

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

§

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

§

impl Hash for pthread_condattr_t

§

impl Hash for pthread_mutex_t

§

impl Hash for pthread_mutexattr_t

§

impl Hash for pthread_rwlock_t

§

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

§

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

§

impl Hash for sockaddr_storage

§

impl Hash for sockaddr_un

§

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

1.0.0 · Source§

impl Hash for str

§

impl Hash for sysinfo

§

impl Hash for termios

§

impl Hash for termios2

§

impl Hash for timespec

§

impl Hash for timeval

§

impl Hash for tm

§

impl Hash for tms

1.0.0 · Source§

impl Hash for u8

1.0.0 · Source§

impl Hash for u16

1.0.0 · Source§

impl Hash for u32

1.0.0 · Source§

impl Hash for u64

1.0.0 · Source§

impl Hash for u128

Source§

impl Hash for uaddr

Source§

impl Hash for uaddr32

§

impl Hash for ucontext_t

§

impl Hash for ucred

1.0.0 · Source§

impl Hash for usize

§

impl Hash for utimbuf

§

impl Hash for utsname

§

impl Hash for winsize

§

impl<'a, T> Hash for Unowned<'a, T>
where T: Hash,

§

impl<'a> Hash for ChannelIoSlice<'a>

1.0.0 · Source§

impl<'a> Hash for Component<'a>

§

impl<'a> Hash for HandleDisposition<'a>

§

impl<'a> Hash for HandleOp<'a>

§

impl<'a> Hash for IobIoSlice<'a>

Source§

impl<'a> Hash for Item<'a>

Source§

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

Source§

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

Source§

impl<'a> Hash for PhantomContravariantLifetime<'a>

Source§

impl<'a> Hash for PhantomCovariantLifetime<'a>

Source§

impl<'a> Hash for PhantomInvariantLifetime<'a>

1.0.0 · Source§

impl<'a> Hash for Prefix<'a>

Source§

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

§

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

§

impl<A, B> Hash for EitherOrBoth<A, B>
where A: Hash, B: 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,

1.55.0 · Source§

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

1.0.0 · Source§

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

Source§

impl<Dyn> Hash for DynMetadata<Dyn>
where Dyn: ?Sized,

1.4.0 · Source§

impl<F> Hash for F
where F: FnPtr,

1.0.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::Range<Idx>
where Idx: Hash,

1.96.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::Range<Idx>
where Idx: Hash,

1.0.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeFrom<Idx>
where Idx: Hash,

1.96.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeFrom<Idx>
where Idx: Hash,

1.26.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeInclusive<Idx>
where Idx: Hash,

1.95.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeInclusive<Idx>
where Idx: Hash,

1.0.0 · Source§

impl<Idx> Hash for RangeTo<Idx>
where Idx: Hash,

1.26.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::RangeToInclusive<Idx>
where Idx: Hash,

1.96.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::range::RangeToInclusive<Idx>
where Idx: Hash,

§

impl<K, T> Hash for Interrupt<K, T>
where K: Hash, T: Hash,

1.0.0 · Source§

impl<K, V, A> Hash for BTreeMap<K, V, A>
where K: Hash, V: Hash, A: Allocator + Clone,

§

impl<K, V> Hash for Slice<K, V>
where K: Hash, V: Hash,

Source§

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

Source§

impl<O> Hash for F32<O>
where O: Hash,

Source§

impl<O> Hash for F64<O>
where O: Hash,

Source§

impl<O> Hash for I16<O>
where O: Hash,

Source§

impl<O> Hash for I32<O>
where O: Hash,

Source§

impl<O> Hash for I64<O>
where O: Hash,

Source§

impl<O> Hash for I128<O>
where O: Hash,

Source§

impl<O> Hash for Isize<O>
where O: Hash,

Source§

impl<O> Hash for U16<O>
where O: Hash,

Source§

impl<O> Hash for U32<O>
where O: Hash,

Source§

impl<O> Hash for U64<O>
where O: Hash,

Source§

impl<O> Hash for U128<O>
where O: Hash,

Source§

impl<O> Hash for Usize<O>
where O: Hash,

1.41.0 · Source§

impl<Ptr> Hash for Pin<Ptr>
where Ptr: Deref, <Ptr as Deref>::Target: Hash,

§

impl<R, W> Hash for Fifo<R, W>

§

impl<Reference, Output> Hash for Clock<Reference, Output>
where Reference: Hash, Output: Hash,

Source§

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

Source§

impl<Storage> Hash for __BindgenBitfieldUnit<Storage>
where Storage: Hash,

1.0.0 · Source§

impl<T, A> Hash for Arc<T, A>
where T: Hash + ?Sized, A: Allocator,

1.0.0 · Source§

impl<T, A> Hash for BTreeSet<T, A>
where T: Hash, A: Allocator + Clone,

1.0.0 · Source§

impl<T, A> Hash for Box<T, A>
where T: Hash + ?Sized, A: Allocator,

1.0.0 · Source§

impl<T, A> Hash for LinkedList<T, A>
where T: Hash, A: Allocator,

1.0.0 · Source§

impl<T, A> Hash for Rc<T, A>
where T: Hash + ?Sized, A: Allocator,

Source§

impl<T, A> Hash for UniqueArc<T, A>
where T: Hash + ?Sized, A: Allocator,

Source§

impl<T, A> Hash for UniqueRc<T, A>
where T: Hash + ?Sized, A: Allocator,

1.0.0 · Source§

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

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));
1.0.0 · Source§

impl<T, A> Hash for VecDeque<T, A>
where T: Hash, A: Allocator,

1.0.0 · Source§

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

§

impl<T, U> Hash for Duration<T, U>
where T: Hash, U: Hash,

§

impl<T, U> Hash for Instant<T, U>
where T: Hash, U: Hash,

Source§

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

Source§

impl<T, const N: usize> Hash for Simd<T, N>
where T: SimdElement + Hash,

1.0.0 · Source§

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));
Source§

impl<T, const VARIANT: u32, const FIELD: u32> Hash for FieldRepresentingType<T, VARIANT, FIELD>
where T: ?Sized,

Source§

impl<T: Hash> Hash for UserRef<T>

1.0.0 · Source§

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

1.0.0 · Source§

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

1.0.0 · Source§

impl<T> Hash for (T₁, T₂, …, Tₙ)
where T: Hash,

This trait is implemented for tuples up to twelve items long.

1.0.0 · Source§

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

1.0.0 · Source§

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

§

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

Source§

impl<T> Hash for ArcKey<T>

1.17.0 · Source§

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

§

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

§

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

1.21.0 · Source§

impl<T> Hash for Discriminant<T>

Source§

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

1.20.0 · Source§

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

1.25.0 · Source§

impl<T> Hash for NonNull<T>
where T: ?Sized,

1.28.0 · Source§

impl<T> Hash for NonZero<T>

1.0.0 · Source§

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

Source§

impl<T> Hash for PhantomContravariant<T>
where T: ?Sized,

Source§

impl<T> Hash for PhantomCovariant<T>
where T: ?Sized,

1.0.0 · Source§

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

Source§

impl<T> Hash for PhantomInvariant<T>
where T: ?Sized,

1.36.0 · Source§

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

Source§

impl<T> Hash for PtrKey<T>

1.19.0 · Source§

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

1.74.0 · Source§

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

§

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

§

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

Source§

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

§

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

Source§

impl<T> Hash for Unalign<T>
where T: Unaligned + Hash,

Source§

impl<T> Hash for WeakKey<T>

1.0.0 · Source§

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

1.0.0 · Source§

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

Source§

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

Source§

impl<T> Hash for __BindgenUnionField<T>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<Y, R> Hash for CoroutineState<Y, R>
where Y: Hash, R: Hash,

Source§

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

§

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

§

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