Trait MapStore

Source
pub trait MapStore {
    type Key;
    type Value;

    const LEN: usize;

    // Required methods
    fn get_key(index: usize) -> Option<Self::Key>;
    fn get_value(index: usize) -> Option<Self::Value>;
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn get_key(index: usize) -> Option<Self::Key>

Source

fn get_value(index: usize) -> Option<Self::Value>

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<K, V> MapStore for (K, V)
where K: AccessSeq, V: AccessSeq,

Source§

const LEN: usize

Source§

type Key = <K as AccessSeq>::Item

Source§

type Value = <V as AccessSeq>::Item

Source§

fn get_key(index: usize) -> Option<Self::Key>

Source§

fn get_value(index: usize) -> Option<Self::Value>

Implementors§

Source§

impl<K> MapStore for K
where K: AccessSeq,

Source§

const LEN: usize = K::LEN

Source§

type Key = <K as AccessSeq>::Item

Source§

type Value = usize