Struct range_map::RangeMultiMap [] [src]

pub struct RangeMultiMap<T, V> { /* fields omitted */ }

A multi-valued mapping from primitive integers to other data.


impl<T: Debug + PrimInt, V: Clone + Debug + PartialEq> RangeMultiMap<T, V>

Creates a new empty map.

Returns the number of mapped ranges.

Checks if the map is empty.

Adds a new mapping from a range of characters to value.

Creates a map from a vector of pairs.

Returns a new RangeMultiMap containing only the mappings for keys that belong to the given set.

Modifies this map in place to only contain mappings whose values v satisfy f(v).

Returns the underlying Vec.

Iterates over all the mapped ranges and values.

impl<T: Debug + PrimInt, V: Clone + Debug + Ord> RangeMultiMap<T, V>

Makes the ranges sorted and non-overlapping. The data associated with each range will be a Vec<T> instead of a single T.

Trait Implementations

impl<T: Clone, V: Clone> Clone for RangeMultiMap<T, V>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Eq, V: Eq> Eq for RangeMultiMap<T, V>

impl<T: Hash, V: Hash> Hash for RangeMultiMap<T, V>

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

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

impl<T: PartialEq, V: PartialEq> PartialEq for RangeMultiMap<T, V>

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

This method tests for !=.

impl<T: Debug + PrimInt, V: Clone + Debug + PartialEq> FromIterator<(Range<T>, V)> for RangeMultiMap<T, V>

Builds a RangeMultiMap from an iterator over Range and values..

impl<T: Debug + PrimInt, V: Clone + Debug + PartialEq> Debug for RangeMultiMap<T, V>

Formats the value using the given formatter.