[][src]Struct ordered_map::OrderedMap

pub struct OrderedMap<K, V, C, F> where
    F: Fn(&V) -> C, 
{ /* fields omitted */ }

Methods

impl<K, V, C, F> OrderedMap<K, V, C, F> where
    K: Eq + Hash + Copy,
    C: PartialOrd,
    F: Fn(&V) -> C, 
[src]

pub fn new(to_comparable: F) -> Self where
    F: Fn(&V) -> C, 
[src]

The function to_comparable is used to convert the value to something comparable

pub fn unordered(&self) -> &HashMap<K, V>[src]

Retrieve the underlying unordered HashMap NOTE: You should not modify this map directly

pub fn descending_keys(&self) -> impl Iterator<Item = K> + '_[src]

Keys of this map in descending order

pub fn ascending_keys(&self) -> impl Iterator<Item = K> + '_[src]

Keys of this map in ascending order

pub fn insert(&mut self, k: K, v: V) -> Option<V>[src]

Insert a new key-value pair to the map

pub fn remove(&mut self, k: &K) -> Option<V>[src]

Remove a key-value pair from the map

Auto Trait Implementations

impl<K, V, C, F> RefUnwindSafe for OrderedMap<K, V, C, F> where
    C: RefUnwindSafe,
    F: RefUnwindSafe,
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V, C, F> Send for OrderedMap<K, V, C, F> where
    C: Send,
    F: Send,
    K: Send,
    V: Send

impl<K, V, C, F> Sync for OrderedMap<K, V, C, F> where
    C: Sync,
    F: Sync,
    K: Sync,
    V: Sync

impl<K, V, C, F> Unpin for OrderedMap<K, V, C, F> where
    C: Unpin,
    F: Unpin,
    K: Unpin,
    V: Unpin

impl<K, V, C, F> UnwindSafe for OrderedMap<K, V, C, F> where
    C: UnwindSafe,
    F: UnwindSafe,
    K: UnwindSafe,
    V: UnwindSafe

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,