pub trait Hash<Q>: CheckedBitPattern {
// Required methods
fn hash_of_lookup_key(lookup_key: &Q) -> u32;
fn eq(&self, lookup_key: &Q, process: &Process) -> bool;
}
Available on crate feature
godot
only.Expand description
A trait for looking up a key in a hash table. The type of the key to look up does not need to match the type in the target process. However, it needs to hash and compare equally in the same way.
Required Methods§
Sourcefn hash_of_lookup_key(lookup_key: &Q) -> u32
fn hash_of_lookup_key(lookup_key: &Q) -> u32
Hashes the lookup key.
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.