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", so this trait is not object safe.

Implementors§

Source§

impl Hash for FileLeaseType

Source§

impl Hash for IptIpFlags

Source§

impl Hash for starnix_uapi::resource_limits::Resource

Source§

impl Hash for SyslogAction

Source§

impl Hash for AsciiChar

1.0.0 · Source§

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

1.44.0 · Source§

impl Hash for Infallible

1.7.0 · Source§

impl Hash for IpAddr

Source§

impl Hash for Ipv6MulticastScope

1.0.0 · Source§

impl Hash for SocketAddr

1.55.0 · Source§

impl Hash for IntErrorKind

1.0.0 · Source§

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

1.0.0 · Source§

impl Hash for std::io::error::ErrorKind

Source§

impl Hash for Colons

Source§

impl Hash for Fixed

Source§

impl Hash for Numeric

Source§

impl Hash for OffsetPrecision

Source§

impl Hash for Pad

Source§

impl Hash for ParseErrorKind

Source§

impl Hash for SecondsFormat

Source§

impl Hash for Month

Source§

impl Hash for Weekday

Source§

impl Hash for Level

Source§

impl Hash for LevelFilter

Source§

impl Hash for Value

Source§

impl Hash for Origin

Source§

impl Hash for zerocopy::byteorder::BigEndian

Source§

impl Hash for zerocopy::byteorder::LittleEndian

1.0.0 · Source§

impl Hash for bool

1.0.0 · Source§

impl Hash for char

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

1.0.0 · Source§

impl Hash for isize

1.29.0 · Source§

impl Hash for !

1.0.0 · Source§

impl Hash for str

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

1.0.0 · Source§

impl Hash for ()

1.0.0 · Source§

impl Hash for usize

Source§

impl Hash for PtraceAccessMode

Source§

impl Hash for SecureBits

Source§

impl Hash for Access

Source§

impl Hash for InotifyMask

Source§

impl Hash for IptIpFlagsV4

Source§

impl Hash for IptIpFlagsV6

Source§

impl Hash for IptIpInverseFlags

Source§

impl Hash for NfIpHooks

Source§

impl Hash for NfNatRangeFlags

Source§

impl Hash for XtTcpInverseFlags

Source§

impl Hash for XtUdpInverseFlags

Source§

impl Hash for MountFlags

Source§

impl Hash for starnix_uapi::open_flags::OpenFlags

Source§

impl Hash for PersonalityFlags

Source§

impl Hash for SealFlags

Source§

impl Hash for Signal

Source§

impl Hash for uaddr32

Source§

impl Hash for uaddr

Source§

impl Hash for UnmountFlags

Source§

impl Hash for UserAddress32

Source§

impl Hash for UserAddress

Source§

impl Hash for FdEvents

Source§

impl Hash for ResolveFlags

1.28.0 · Source§

impl Hash for Layout

1.0.0 · Source§

impl Hash for TypeId

Source§

impl Hash for ByteStr

1.64.0 · Source§

impl Hash for CStr

1.0.0 · Source§

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

1.33.0 · Source§

impl Hash for PhantomPinned

1.0.0 · Source§

impl Hash for Ipv4Addr

1.0.0 · Source§

impl Hash for Ipv6Addr

1.0.0 · Source§

impl Hash for SocketAddrV4

1.0.0 · Source§

impl Hash for SocketAddrV6

1.0.0 · Source§

impl Hash for RangeFull

1.10.0 · Source§

impl Hash for Location<'_>

Source§

impl Hash for Alignment

1.3.0 · Source§

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

Source§

impl Hash for ByteString

1.64.0 · Source§

impl Hash for CString

1.0.0 · Source§

impl Hash for String

1.0.0 · Source§

impl Hash for OsStr

1.0.0 · Source§

impl Hash for OsString

1.1.0 · Source§

impl Hash for FileType

1.0.0 · Source§

impl Hash for std::path::Path

1.0.0 · Source§

impl Hash for PathBuf

1.0.0 · Source§

impl Hash for PrefixComponent<'_>

1.19.0 · Source§

impl Hash for ThreadId

1.8.0 · Source§

impl Hash for std::time::Instant

1.8.0 · Source§

impl Hash for SystemTime

Source§

impl Hash for Parsed

Source§

impl Hash for InternalFixed

Source§

impl Hash for InternalNumeric

Source§

impl Hash for OffsetFormat

Source§

impl Hash for chrono::format::ParseError

Source§

impl Hash for Months

Source§

impl Hash for NaiveDate

Source§

impl Hash for NaiveDateDaysIterator

Source§

impl Hash for NaiveDateWeeksIterator

Source§

impl Hash for NaiveDateTime

Source§

impl Hash for IsoWeek

Source§

impl Hash for Days

Source§

impl Hash for NaiveWeek

Source§

impl Hash for NaiveTime

Source§

impl Hash for FixedOffset

Source§

impl Hash for Utc

Source§

impl Hash for OutOfRange

Source§

impl Hash for TimeDelta

Source§

impl Hash for WeekdaySet

Source§

impl Hash for Map<String, Value>

Source§

impl Hash for Number

Source§

impl Hash for OpaqueOrigin

Source§

impl Hash for url::Url

URLs hash like their serialization.

Source§

impl Hash for BStr

Source§

impl Hash for BString

Source§

impl Hash for BugRef

Source§

impl Hash for Status

Source§

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 IobSharedRegion

§

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 Unavailable

§

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

Available on crate feature extra_traits only.
§

impl Hash for dirent64

Available on crate feature 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

Available on crate feature 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

Available on crate feature extra_traits only.
§

impl Hash for pthread_condattr_t

§

impl Hash for pthread_mutex_t

Available on crate feature extra_traits only.
§

impl Hash for pthread_mutexattr_t

§

impl Hash for pthread_rwlock_t

Available on crate feature 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

Available on crate feature 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

Available on crate feature extra_traits only.
§

impl Hash for sockaddr_storage

Available on crate feature extra_traits only.
§

impl Hash for sockaddr_un

Available on crate feature 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

Available on crate feature 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

Available on crate feature extra_traits only.
§

impl Hash for ucred

§

impl Hash for utimbuf

§

impl Hash for utsname

Available on crate feature extra_traits only.
§

impl Hash for winsize

1.0.0 · Source§

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

1.0.0 · Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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>
where T: Hash + Into<NullableHandle>,

Source§

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

1.0.0 · Source§

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

1.55.0 · Source§

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

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.0.0 · Source§

impl<Idx> Hash for starnix_uapi::arch32::__static_assertions::_core::ops::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.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,

Source§

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

Source§

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

Source§

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

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,

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.17.0 · Source§

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

1.0.0 · Source§

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

1.36.0 · Source§

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

Source§

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

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,

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]
where T: Hash,

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.

Source§

impl<T> Hash for ArcKey<T>

Source§

impl<T> Hash for PtrKey<T>

Source§

impl<T> Hash for WeakKey<T>

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,

1.19.0 · Source§

impl<T> Hash for Reverse<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.21.0 · Source§

impl<T> Hash for Discriminant<T>

1.20.0 · Source§

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

1.28.0 · Source§

impl<T> Hash for NonZero<T>

1.74.0 · Source§

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

1.0.0 · Source§

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

1.25.0 · Source§

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

Source§

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

Source§

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

§

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,

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 BTreeSet<T, A>
where T: Hash, A: Allocator + Clone,

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 VecDeque<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 UniqueRc<T, A>
where T: Hash + ?Sized, A: Allocator,

1.0.0 · Source§

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

Source§

impl<T, A> Hash for UniqueArc<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, 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,

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 N: usize> Hash for Simd<T, N>

Source§

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

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>