asr::game_engine::godot

Trait Hash

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

Source

fn hash_of_lookup_key(lookup_key: &Q) -> u32

Hashes the lookup key.

Source

fn eq(&self, lookup_key: &Q, process: &Process) -> bool

Compares the lookup key with the key in the target process. Errors are meant to be ignored and instead treated as comparing unequal.

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<const N: usize> Hash<[u8; N]> for StringName