pub struct SequenceMap<V> { /* private fields */ }Expand description
Map that preserves insertion order and provides sequence-numbered access.
Implementations§
Source§impl<V: Clone> SequenceMap<V>
impl<V: Clone> SequenceMap<V>
pub fn new() -> Self
pub fn insert(&mut self, key: &str, value: V) -> u64
pub fn remove(&mut self, key: &str) -> bool
pub fn get(&self, key: &str) -> Option<&V>
pub fn get_by_index(&self, index: usize) -> Option<&SeqEntry<V>>
pub fn index_of(&self, key: &str) -> Option<usize>
pub fn contains(&self, key: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Vec<&str>
pub fn values(&self) -> Vec<&V>
pub fn clear(&mut self)
pub fn next_seq(&self) -> u64
pub fn seq_of(&self, key: &str) -> Option<u64>
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for SequenceMap<V>
impl<V> RefUnwindSafe for SequenceMap<V>where
V: RefUnwindSafe,
impl<V> Send for SequenceMap<V>where
V: Send,
impl<V> Sync for SequenceMap<V>where
V: Sync,
impl<V> Unpin for SequenceMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for SequenceMap<V>
impl<V> UnwindSafe for SequenceMap<V>where
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