Trait Key

Source
pub trait Key: Copy + PartialEq {
    // Required methods
    fn to_usize(self) -> usize;
    fn from_usize(k: usize) -> Self;
}

Required Methods§

Source

fn to_usize(self) -> usize

Source

fn from_usize(k: usize) -> Self

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 u8

Source§

impl Key for u16

Source§

impl Key for u32

Source§

impl Key for u64

Source§

impl Key for usize

Implementors§