[−][src]Struct ordered_map::OrderedMap
Methods
impl<K, V, C, F> OrderedMap<K, V, C, F> where
K: Eq + Hash + Copy,
C: PartialOrd,
F: Fn(&V) -> C,
[src]
K: Eq + Hash + Copy,
C: PartialOrd,
F: Fn(&V) -> C,
pub fn new(to_comparable: F) -> Self where
F: Fn(&V) -> C,
[src]
F: Fn(&V) -> C,
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,
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,
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,
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,
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,
C: UnwindSafe,
F: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,