pub trait Lattice: MeetSemilattice + JoinSemilattice + PartialOrd {
// Provided methods
fn meet_join(&self, other: &Self) -> (Self, Self) { ... }
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self> { ... }
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self> { ... }
fn partial_sort2<'a>(
&'a self,
other: &'a Self
) -> Option<(&'a Self, &'a Self)> { ... }
fn partial_clamp<'a>(
&'a self,
min: &'a Self,
max: &'a Self
) -> Option<&'a Self> { ... }
}
Expand description
Partially orderable sets where every two elements have a supremum and infimum.
Provided Methods§
sourcefn meet_join(&self, other: &Self) -> (Self, Self)
fn meet_join(&self, other: &Self) -> (Self, Self)
Returns the infimum and the supremum simultaneously.
sourcefn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of self
and other
if they are comparable.
sourcefn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of self
and other
if they are comparable.
Object Safety§
This trait is not object safe.