Struct flat_map::flat_map::FlatMap [] [src]

pub struct FlatMap<K, V> { /* fields omitted */ }

Methods

impl<K, V> FlatMap<K, V>
[src]

Returns the number of elements the VecMap can hold without reallocating.

Examples

use flat_map::FlatMap;
let map: FlatMap<String, String> = FlatMap::with_capacity(10);
assert!(map.capacity() >= 10);

Return true if the map contains no elements.

Examples

use flat_map::FlatMap;

let mut a = FlatMap::new();
assert!(a.is_empty());
a.insert("1", "a");
assert!(!a.is_empty());

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

Return Option<&mut V>.

Example

use flat_map::FlatMap;

let mut m = FlatMap::new();
m.insert(1, "foo".to_string());
m.get_mut(&1).unwrap().push_str("bar");
assert_eq!("foobar", m.get_mut(&1).unwrap());

Trait Implementations

impl<K: Clone, V: Clone> Clone for FlatMap<K, V>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<K, V> IntoIterator for FlatMap<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, K, V> IntoIterator for &'a FlatMap<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, K, V> IntoIterator for &'a mut FlatMap<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<K: Ord, V> FromIterator<(K, V)> for FlatMap<K, V>
[src]

Creates a value from an iterator. Read more

impl<K: Ord, V> Extend<(K, V)> for FlatMap<K, V>
[src]

Extends a collection with the contents of an iterator. Read more

impl<'a, K: Ord + Copy, V: Copy> Extend<(&'a K, &'a V)> for FlatMap<K, V>
[src]

Extends a collection with the contents of an iterator. Read more

impl<K: Hash, V: Hash> Hash for FlatMap<K, V>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

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

Returns the "default value" for a type. Read more

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

This method returns an Ordering between self and other. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

impl<K: PartialOrd, V: PartialOrd> PartialOrd for FlatMap<K, V>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Formats the value using the given formatter.

impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for FlatMap<K, V> where
    K: Borrow<Q>,
    Q: Ord
[src]

The returned type after indexing

The method for the indexing (container[index]) operation