Trait MapStore

Source
pub trait MapStore<'data> {
    type Key: 'data;
    type Value: 'data;

    const LEN: usize;

    // Required methods
    fn get_key(&self, index: usize) -> Self::Key;
    fn get_value(&self, index: usize) -> Self::Value;
}

Required Associated Constants§

Required Associated Types§

Source

type Key: 'data

Source

type Value: 'data

Required Methods§

Source

fn get_key(&self, index: usize) -> Self::Key

Source

fn get_value(&self, index: usize) -> 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<'data, K, V> MapStore<'data> for (K, V)
where K: AccessSeq<'data>, V: AccessSeq<'data>,

Source§

const LEN: usize

Source§

type Key = <K as AccessSeq<'data>>::Item

Source§

type Value = <V as AccessSeq<'data>>::Item

Source§

fn get_key(&self, index: usize) -> Self::Key

Source§

fn get_value(&self, index: usize) -> Self::Value

Implementors§

Source§

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

Source§

const LEN: usize = K::LEN

Source§

type Key = <K as AccessSeq<'data>>::Item

Source§

type Value = usize

Source§

impl<'data, M> MapStore<'data> for Ordered<M>
where M: MapStore<'data>,

Source§

const LEN: usize = M::LEN

Source§

type Key = <M as MapStore<'data>>::Key

Source§

type Value = <M as MapStore<'data>>::Value