Struct gluon_check::substitution::UnionByLevel
source · pub struct UnionByLevel { /* private fields */ }
Expand description
Specialized union implementation which makes sure that variables with a higher level always point to the lower level variable.
map.union(1, 2); map.find(2) -> 1 map.find(1) -> 1
Trait Implementations§
source§impl Clone for UnionByLevel
impl Clone for UnionByLevel
source§fn clone(&self) -> UnionByLevel
fn clone(&self) -> UnionByLevel
Returns a copy 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 Debug for UnionByLevel
impl Debug for UnionByLevel
source§impl From<u32> for UnionByLevel
impl From<u32> for UnionByLevel
source§impl PartialEq for UnionByLevel
impl PartialEq for UnionByLevel
source§fn eq(&self, other: &UnionByLevel) -> bool
fn eq(&self, other: &UnionByLevel) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl UnifyKey for UnionByLevel
impl UnifyKey for UnionByLevel
type Value = Level
fn index(&self) -> u32
fn from_index(index: u32) -> Self
fn tag() -> &'static str
source§fn order_roots(
a: Self,
a_level: &Level,
b: Self,
b_level: &Level
) -> Option<(Self, Self)>
fn order_roots( a: Self, a_level: &Level, b: Self, b_level: &Level ) -> Option<(Self, Self)>
You should return first the key that should be used as root,
then the other key (that will then point to the new root). Read more
impl Copy for UnionByLevel
impl Eq for UnionByLevel
impl StructuralEq for UnionByLevel
impl StructuralPartialEq for UnionByLevel
Auto Trait Implementations§
impl RefUnwindSafe for UnionByLevel
impl Send for UnionByLevel
impl Sync for UnionByLevel
impl Unpin for UnionByLevel
impl UnwindSafe for UnionByLevel
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