pub struct SeqMap<V> { /* private fields */ }Expand description
Insertion-order-preserving String-keyed map with a mutable
get-or-insert-default accessor. Same shape as graph::OrderedMap, kept as
a separate small type here because that one exposes no get_mut/entry-style
API. Public for the same reason as SeqSet – appears in
ImpactWalkResult::visited.
Implementations§
Source§impl<V> SeqMap<V>
impl<V> SeqMap<V>
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Returns whether key is present.
Sourcepub fn insert(&mut self, key: String, value: V)
pub fn insert(&mut self, key: String, value: V)
Inserts or replaces the value for key while preserving key order.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for SeqMap<V>
impl<V> RefUnwindSafe for SeqMap<V>
impl<V> Send for SeqMap<V>
impl<V> Sync for SeqMap<V>
impl<V> Unpin for SeqMap<V>
impl<V> UnsafeUnpin for SeqMap<V>
impl<V> UnwindSafe for SeqMap<V>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more