Skip to main content

AsMapConverter

Trait AsMapConverter 

Source
pub trait AsMapConverter {
    type Key;
    type Value;

    // Required methods
    fn len(&self) -> usize;
    fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>;
    fn from(
        data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>,
    ) -> Result<Self>
       where Self: Sized;
}

Required Associated Types§

Required Methods§

Source

fn len(&self) -> usize

Source

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>
where Self: Sized,

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<K, V, S> AsMapConverter for DashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Clone + Default,

Source§

type Key = K

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Source§

impl<K, V, S> AsMapConverter for HashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Default,

Source§

type Key = K

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Source§

impl<K, V, S> AsMapConverter for IndexMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Default,

Source§

type Key = K

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Source§

impl<K, V, S> AsMapConverter for LinkedHashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Default,

Source§

type Key = K

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Source§

impl<V> AsMapConverter for AtomMap<V>

Source§

type Key = Atom

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Source§

impl<V> AsMapConverter for IndexAtomMap<V>

Source§

type Key = Atom

Source§

type Value = V

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>

Source§

fn from( data: impl Iterator<Item = Result<(Self::Key, Self::Value)>>, ) -> Result<Self>

Implementors§