Struct raii_map::map::Map[][src]

pub struct Map<K, V>(_);

A map in which the presence of an entry is tied to the lifetime of a RAII handle returned by the insertion.

Implementations

impl<K: Ord, V> Map<K, V>[src]

pub fn new() -> Self[src]

Creates a new, empty map.

pub fn len(&self) -> usize[src]

Gets the number of items in the map.

pub fn is_empty(&self) -> bool[src]

Checks if the map is empty.

pub fn iter(&self) -> Iter<'_, K, V>[src]

Gets an iterator over the contents of the map.

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>[src]

Gets a mutable iterator over the contents of the map.

pub fn keys(&self) -> Keys<'_, K, V>[src]

Gets an iterator over the keys of the map.

pub fn values(&self) -> Values<'_, K, V>[src]

Gets an iterator over the values of the map.

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>[src]

Gets a mutable iterator over the values of the map.

Trait Implementations

impl<K: Debug, V: Debug> Debug for Map<K, V>[src]

impl<K: Ord, V> Default for Map<K, V>[src]

impl<K: Eq, V: Eq> Eq for Map<K, V>[src]

impl<K: Ord, V> IntoIterator for Map<K, V>[src]

type Item = (K, V)

The type of the elements being iterated over.

type IntoIter = <BTreeMap<K, V> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<'a, K: Ord, V> IntoIterator for &'a Map<K, V>[src]

type Item = (&'a K, &'a V)

The type of the elements being iterated over.

type IntoIter = <&'a BTreeMap<K, V> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<'a, K: Ord, V> IntoIterator for &'a mut Map<K, V>[src]

type Item = (&'a K, &'a mut V)

The type of the elements being iterated over.

type IntoIter = <&'a mut BTreeMap<K, V> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<K: PartialEq, V: PartialEq> PartialEq<Map<K, V>> for Map<K, V>[src]

impl<K, V> StructuralEq for Map<K, V>[src]

impl<K, V> StructuralPartialEq for Map<K, V>[src]

Auto Trait Implementations

impl<K, V> Send for Map<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for Map<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for Map<K, V>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.