pub trait BoundedLattice: BoundedJoinSemilattice + BoundedMeetSemilattice { }Expand description
A bounded lattice: a lattice with both bottom and top elements.
Laws (not enforced by type system):
- All bounded join-semilattice laws
- All bounded meet-semilattice laws
- Absorption:
a.join(a.meet(b)) == aanda.meet(a.join(b)) == a - Complement bounds:
bottom().meet(a) == bottom()andtop().join(a) == top()
§Example
use algebra_core::{BoundedJoinSemilattice, BoundedMeetSemilattice, BoundedLattice};
// bool is a bounded lattice
assert_eq!(bool::bottom(), false);
assert_eq!(bool::top(), true);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.