Struct pancake_engine_ssi::ds_n_a::ordered_dict::OrderedDict
source · pub struct OrderedDict<K, V> {
dict: HashMap<K, DictValue<K, V>>,
newest_k: Option<K>,
}Expand description
A structure that contains
- a hash-map and
- a virtual linked-list connecting neighboring entries in their insertion order.
Fields§
§dict: HashMap<K, DictValue<K, V>>§newest_k: Option<K>Implementations§
source§impl<K, V> OrderedDict<K, V>
impl<K, V> OrderedDict<K, V>
pub fn new() -> Self
pub fn get<'s, 'a>(&'s self, k: &'a K) -> Option<&'s V>
pub fn get_mut<'s, 'a>(&'s mut self, k: &'a K) -> Option<&'s mut V>
pub fn get_newest_key(&self) -> Option<&K>
pub fn get_neighbors<'s, 'a>(&'s self, k: &'a K) -> Option<Neighbors<'s, K, V>>
pub fn insert(&mut self, k: K, v: V)
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for OrderedDict<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for OrderedDict<K, V>
impl<K, V> Sync for OrderedDict<K, V>
impl<K, V> Unpin for OrderedDict<K, V>
impl<K, V> UnwindSafe for OrderedDict<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more