DictKey

Trait DictKey 

Source
pub trait DictKey {
    type Array<T>: Array<T>;

    const VARIANTS: &'static [&'static str];

    // Required methods
    fn from_index(index: usize) -> Self;
    fn as_index(&self) -> usize;
}
Expand description

Trait for types that can be used as dictionary keys

Required Associated Constants§

Source

const VARIANTS: &'static [&'static str]

Required Associated Types§

Source

type Array<T>: Array<T>

Required Methods§

Source

fn from_index(index: usize) -> Self

Source

fn as_index(&self) -> usize

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§