Skip to main content

SimdKey

Trait SimdKey 

Source
pub trait SimdKey: Copy + Ord {
    const BITS: u32;

    // Required method
    fn encode(self) -> u128;
}
Expand description

Maps a key to an unsigned integer with exactly the same ordering.

BITS must be 8, 16, 32, 64, or 128. encode must be deterministic, fit in BITS, and satisfy a.cmp(&b) == a.encode().cmp(&b.encode()).

Required Associated Constants§

Required Methods§

Source

fn encode(self) -> u128

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SimdKey for i8

Source§

const BITS: u32 = i8::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for i16

Source§

const BITS: u32 = i16::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for i32

Source§

const BITS: u32 = i32::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for i64

Source§

const BITS: u32 = i64::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for i128

Source§

const BITS: u32 = i128::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for isize

Source§

const BITS: u32 = isize::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for u8

Source§

const BITS: u32 = u8::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for u16

Source§

const BITS: u32 = u16::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for u32

Source§

const BITS: u32 = u32::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for u64

Source§

const BITS: u32 = u64::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for u128

Source§

const BITS: u32 = u128::BITS

Source§

fn encode(self) -> u128

Source§

impl SimdKey for usize

Source§

const BITS: u32 = usize::BITS

Source§

fn encode(self) -> u128

Implementors§