Skip to main content

Key

Trait Key 

Source
pub trait Key: Copy + Eq {
    const VACANT: Self;

    // Required method
    fn hash(&self) -> u64;
}
Expand description

A key a table can hold: its hash must be well mixed in the TOP bits.

Required Associated Constants§

Source

const VACANT: Self

Every bit set: what a vacant slot holds, so that emptying a table is one byte fill.

Required Methods§

Source

fn hash(&self) -> u64

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.

Implementations on Foreign Types§

Source§

impl Key for (u32, u32)

Source§

const VACANT: Self

Source§

fn hash(&self) -> u64

Source§

impl Key for (u32, u32, u32)

Source§

const VACANT: Self

Source§

fn hash(&self) -> u64

Source§

impl Key for (u32, u32, u32, u32)

Source§

const VACANT: Self

Source§

fn hash(&self) -> u64

Source§

impl Key for (u32, u64)

Source§

const VACANT: Self

Source§

fn hash(&self) -> u64

Implementors§