pub struct OnionFastMap<K: PartialEq + Eq + Hash + Clone, V> { /* private fields */ }Implementations§
Source§impl<K: PartialEq + Eq + Hash + Clone, V> OnionFastMap<K, V>
impl<K: PartialEq + Eq + Hash + Clone, V> OnionFastMap<K, V>
pub fn new(pool: OnionKeyPool<K>) -> Self
pub fn pool(&self) -> &OnionKeyPool<K>
pub fn new_with_pairs(pairs: Vec<(usize, V)>, pool: OnionKeyPool<K>) -> Self
pub fn push<Q>(&mut self, key: &Q, value: V) -> Option<()>
pub fn push_with_index(&mut self, index: usize, value: V) -> Option<()>
pub fn pairs(&self) -> &[(usize, V)]
pub fn set_pairs(&mut self, pairs: Vec<(usize, V)>)
pub fn clear(&mut self)
pub fn to_index<Q>(&self, key: &Q) -> Option<usize>
pub fn from_index(&self, index: usize) -> Option<&K>
pub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get_by_index(&self, target_index: usize) -> Option<&V>
Trait Implementations§
Source§impl<K: Clone + PartialEq + Eq + Hash + Clone, V: Clone> Clone for OnionFastMap<K, V>
impl<K: Clone + PartialEq + Eq + Hash + Clone, V: Clone> Clone for OnionFastMap<K, V>
Source§fn clone(&self) -> OnionFastMap<K, V>
fn clone(&self) -> OnionFastMap<K, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<K, V> Freeze for OnionFastMap<K, V>
impl<K, V> RefUnwindSafe for OnionFastMap<K, V>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, V> Send for OnionFastMap<K, V>
impl<K, V> Sync for OnionFastMap<K, V>
impl<K, V> Unpin for OnionFastMap<K, V>where
V: Unpin,
impl<K, V> UnwindSafe for OnionFastMap<K, V>where
K: RefUnwindSafe,
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