pub struct VarRemapping<'db> {
pub remapping: SmallOrderedMap<VariableId, VarUsage<'db>>,
}Expand description
Remapping of lowered variable ids. Useful for convergence of branches.
Fields§
§remapping: SmallOrderedMap<VariableId, VarUsage<'db>>Map from new_var to old_var (since new_var cannot appear twice, but old_var can).
Methods from Deref<Target = SmallOrderedMap<VariableId, VarUsage<'db>>>§
Sourcepub fn eq_unordered(&self, other: &SmallOrderedMap<Key, Value>) -> bool
pub fn eq_unordered(&self, other: &SmallOrderedMap<Key, Value>) -> bool
Checks if the two maps have the same keys and values.
Methods from Deref<Target = VecMap<Key, Value>>§
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn clear(&mut self)
pub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn get<'l, Q>(&'l self, key: &Q) -> Option<&'l V>
pub fn get_mut<'l, Q>(&'l mut self, key: &Q) -> Option<&'l mut V>
pub fn insert(&mut self, key: K, value: V) -> Option<V>where
K: PartialEq,
pub fn drain(&mut self) -> Drain<'_, K, V>
pub fn reserve(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn get_key_value<'l, Q>(&'l self, key: &Q) -> Option<(&'l K, &'l V)>
pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
pub fn entry(&mut self, key: K) -> Entry<'_, K, V>where
K: PartialEq,
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
pub fn retain<F>(&mut self, f: F)
pub fn iter(&self) -> Iter<'_, K, V>
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>
pub fn sort(&mut self)where
K: Ord,
Sourcepub unsafe fn identical(&self, other: &VecMap<K, V>) -> bool
pub unsafe fn identical(&self, other: &VecMap<K, V>) -> bool
Much faster than self == other, but will return false if the order of the data isn’t identical.
§Safety
Note that for the order of data with two VecMaps to be identical, they must either have been both sorted,
or they must have undergone the insertion and removal of keys in the same order.
pub fn keys(&self) -> Keys<'_, K, V>
pub fn values(&self) -> Values<'_, K, V>
Trait Implementations§
Source§impl<'db> Clone for VarRemapping<'db>
impl<'db> Clone for VarRemapping<'db>
Source§fn clone(&self) -> VarRemapping<'db>
fn clone(&self) -> VarRemapping<'db>
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 moreSource§impl<'db> Debug for VarRemapping<'db>
impl<'db> Debug for VarRemapping<'db>
Source§impl<'db> DebugWithDb<'db> for VarRemapping<'db>
impl<'db> DebugWithDb<'db> for VarRemapping<'db>
type Db = LoweredFormatter<'db>
fn fmt(&self, f: &mut Formatter<'_>, _ctx: &Self::Db) -> Result
fn debug<'me>(&'me self, db: &'db Self::Db) -> DebugWith<'me, 'db, Self::Db>where
Self: Sized + 'me,
fn into_debug<'me>(self, db: &'db Self::Db) -> DebugWith<'me, 'db, Self::Db>where
Self: Sized + 'me,
Source§impl<'db> Default for VarRemapping<'db>
impl<'db> Default for VarRemapping<'db>
Source§fn default() -> VarRemapping<'db>
fn default() -> VarRemapping<'db>
Returns the “default value” for a type. Read more
Source§impl<'db> Deref for VarRemapping<'db>
impl<'db> Deref for VarRemapping<'db>
Source§impl<'db> DerefMut for VarRemapping<'db>
impl<'db> DerefMut for VarRemapping<'db>
Source§impl<'db> PartialEq for VarRemapping<'db>
impl<'db> PartialEq for VarRemapping<'db>
impl<'db> Eq for VarRemapping<'db>
impl<'db> StructuralPartialEq for VarRemapping<'db>
Auto Trait Implementations§
impl<'db> Freeze for VarRemapping<'db>
impl<'db> RefUnwindSafe for VarRemapping<'db>
impl<'db> Send for VarRemapping<'db>
impl<'db> Sync for VarRemapping<'db>
impl<'db> Unpin for VarRemapping<'db>
impl<'db> UnwindSafe for VarRemapping<'db>
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<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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