Struct miri::borrow_tracker::tree_borrows::unimap::UniValMap
source · pub struct UniValMap<V> {
data: Vec<Option<V>>,
}Expand description
From UniIndex to V
Fields§
§data: Vec<Option<V>>The mapping data. Thanks to Vec we get both fast accesses, and a memory-optimal representation if there are few deletions.
Implementations§
source§impl<V> UniValMap<V>
impl<V> UniValMap<V>
sourcepub fn contains_idx(&self, idx: UniIndex) -> bool
pub fn contains_idx(&self, idx: UniIndex) -> bool
Whether this index has an associated value.
sourcefn extend_to_length(&mut self, len: usize)
fn extend_to_length(&mut self, len: usize)
Reserve enough space to insert the value at the right index.
sourcepub fn insert(&mut self, idx: UniIndex, val: V)
pub fn insert(&mut self, idx: UniIndex, val: V)
Assign a value to the index. Permanently overwrites any previous value.
Trait Implementations§
source§impl<V: PartialEq> PartialEq<UniValMap<V>> for UniValMap<V>
impl<V: PartialEq> PartialEq<UniValMap<V>> for UniValMap<V>
impl<V: Eq> Eq for UniValMap<V>
impl<V> StructuralEq for UniValMap<V>
impl<V> StructuralPartialEq for UniValMap<V>
Auto Trait Implementations§
impl<V> RefUnwindSafe for UniValMap<V>where V: RefUnwindSafe,
impl<V> Send for UniValMap<V>where V: Send,
impl<V> Sync for UniValMap<V>where V: Sync,
impl<V> Unpin for UniValMap<V>where V: Unpin,
impl<V> UnwindSafe for UniValMap<V>where V: UnwindSafe,
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes