Lattice

Trait Lattice 

Source
pub trait Lattice: PartialOrd + Sized {
    // Required methods
    fn meet_mut(&mut self, other: Self) -> bool;
    fn join_mut(&mut self, other: Self) -> bool;

    // Provided methods
    fn meet(self, other: Self) -> Self { ... }
    fn join(self, other: Self) -> Self { ... }
}
Expand description

A Lattice is a PartialOrd where each pair of elements has a least upper bound (join) and a greatest lower bound (meet)

Required Methods§

Source

fn meet_mut(&mut self, other: Self) -> bool

ensures self is the join of self and other

Returns true if self was changed.

Source

fn join_mut(&mut self, other: Self) -> bool

ensures self is the meet of self and other.

Returns true if self was changed.

Provided Methods§

Source

fn meet(self, other: Self) -> Self

The greatest lower bound of two elements. meet(x, y) is the biggest value z s.t. z <= x and z <= y

Source

fn join(self, other: Self) -> Self

The least upper bound of two elements. join(x, y) is the smallest value z s.t. z >= x and z >= y.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Lattice for bool

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for i8

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for i16

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for i32

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for i64

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for i128

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for isize

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for u8

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for u16

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for u32

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for u64

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for u128

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl Lattice for ()

Source§

fn meet_mut(&mut self, _other: Self) -> bool

Source§

fn join_mut(&mut self, _other: Self) -> bool

Source§

fn meet(self, _other: Self) -> Self

Source§

fn join(self, _other: Self) -> Self

Source§

impl Lattice for usize

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl<T0> Lattice for (T0,)
where (T0,): Ord,

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1> Lattice for (T0, T1)
where (T0, T1): Ord,

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2> Lattice for (T0, T1, T2)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3> Lattice for (T0, T1, T2, T3)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4> Lattice for (T0, T1, T2, T3, T4)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5> Lattice for (T0, T1, T2, T3, T4, T5)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Lattice for (T0, T1, T2, T3, T4, T5, T6)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Lattice for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Lattice for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Lattice for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Lattice for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

impl<T: Lattice + Clone> Lattice for Rc<T>

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl<T: Lattice + Clone> Lattice for Arc<T>

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl<T: Lattice + Sized> Lattice for Box<T>

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl<T: Lattice> Lattice for Option<T>

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Source§

impl<T: Lattice> Lattice for Reverse<T>

Source§

fn meet(self, other: Self) -> Self

Source§

fn join(self, other: Self) -> Self

Source§

fn meet_mut(&mut self, other: Self) -> bool

Source§

fn join_mut(&mut self, other: Self) -> bool

Implementors§

Source§

impl<T0: Lattice> Lattice for Product<(T0,)>

Source§

impl<T0: Lattice, T1: Lattice> Lattice for Product<(T0, T1)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice> Lattice for Product<(T0, T1, T2)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice> Lattice for Product<(T0, T1, T2, T3)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice> Lattice for Product<(T0, T1, T2, T3, T4)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice, T6: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5, T6)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice, T6: Lattice, T7: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5, T6, T7)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice, T6: Lattice, T7: Lattice, T8: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5, T6, T7, T8)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice, T6: Lattice, T7: Lattice, T8: Lattice, T9: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)>

Source§

impl<T0: Lattice, T1: Lattice, T2: Lattice, T3: Lattice, T4: Lattice, T5: Lattice, T6: Lattice, T7: Lattice, T8: Lattice, T9: Lattice, T10: Lattice> Lattice for Product<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>

Source§

impl<T: Eq + Hash + Ord> Lattice for Set<T>

Source§

impl<T: Ord> Lattice for OrdLattice<T>

Source§

impl<T: PartialEq> Lattice for ConstPropagation<T>

Source§

impl<T: Lattice> Lattice for Dual<T>

Source§

impl<const BOUND: usize, T: PartialEq + Eq + Hash + Ord> Lattice for BoundedSet<BOUND, T>

Source§

impl<const N: usize, T: Lattice> Lattice for Product<[T; N]>