Lattice

Trait Lattice 

Source
pub trait Lattice {
    // Required methods
    fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>
       where Self: Sized;
    fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>
       where Self: Sized;

    // Provided methods
    fn join_into(&mut self, other: Self) -> AlgebraicStatus
       where Self: Sized { ... }
    fn join_all<S: AsRef<Self>, Args: AsRef<[S]>>(
        xs: Args,
    ) -> AlgebraicResult<Self>
       where Self: Sized + Clone { ... }
}
Expand description

Implements basic algebraic behavior (union & intersection) for a type

Required Methods§

Source

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>
where Self: Sized,

Implements the union operation between two instances of a type in a partial lattice, resulting in the creation of a new result instance

Source

fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>
where Self: Sized,

Implements the intersection operation between two instances of a type in a partial lattice

Provided Methods§

Source

fn join_into(&mut self, other: Self) -> AlgebraicStatus
where Self: Sized,

Implements the union operation between two instances of a type, consuming the other input operand, and modifying self to become the joined type

Source

fn join_all<S: AsRef<Self>, Args: AsRef<[S]>>(xs: Args) -> AlgebraicResult<Self>
where Self: Sized + Clone,

Implementations on Foreign Types§

Source§

impl Lattice for bool

Source§

fn pjoin(&self, other: &bool) -> AlgebraicResult<bool>

Source§

fn pmeet(&self, other: &bool) -> AlgebraicResult<bool>

Source§

impl Lattice for u8

Source§

fn pjoin(&self, _other: &u8) -> AlgebraicResult<u8>

Source§

fn pmeet(&self, _other: &u8) -> AlgebraicResult<u8>

Source§

impl Lattice for u16

Source§

fn pjoin(&self, _other: &u16) -> AlgebraicResult<u16>

Source§

fn pmeet(&self, _other: &u16) -> AlgebraicResult<u16>

Source§

impl Lattice for u32

Source§

fn pjoin(&self, _other: &u32) -> AlgebraicResult<u32>

Source§

fn pmeet(&self, _other: &u32) -> AlgebraicResult<u32>

Source§

impl Lattice for u64

Source§

fn pjoin(&self, _other: &u64) -> AlgebraicResult<u64>

Source§

fn pmeet(&self, _other: &u64) -> AlgebraicResult<u64>

Source§

impl Lattice for ()

Source§

fn pjoin(&self, _other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet(&self, _other: &Self) -> AlgebraicResult<Self>

Source§

impl Lattice for usize

Source§

fn pjoin(&self, _other: &usize) -> AlgebraicResult<usize>

Source§

fn pmeet(&self, _other: &usize) -> AlgebraicResult<usize>

Source§

impl Lattice for [u64; 4]

Source§

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>

Source§

impl<K> Lattice for HashSet<K>
where Self: SetLattice, <Self as SetLattice>::V: Lattice,

Source§

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>

Source§

impl<K, V> Lattice for HashMap<K, V>
where Self: SetLattice, <Self as SetLattice>::V: Lattice,

Source§

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>

Source§

impl<V: Lattice + Clone + Send + Sync, A: Allocator> Lattice for Option<TrieNodeODRc<V, A>>

Source§

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet( &self, other: &Option<TrieNodeODRc<V, A>>, ) -> AlgebraicResult<Option<TrieNodeODRc<V, A>>>

Source§

impl<V: Lattice + Clone> Lattice for Option<V>

Source§

fn pjoin(&self, other: &Option<V>) -> AlgebraicResult<Self>

Source§

fn join_into(&mut self, other: Self) -> AlgebraicStatus

Source§

fn pmeet(&self, other: &Option<V>) -> AlgebraicResult<Option<V>>

Source§

impl<V: Lattice> Lattice for Box<V>

Source§

fn pjoin(&self, other: &Self) -> AlgebraicResult<Self>

Source§

fn pmeet(&self, other: &Self) -> AlgebraicResult<Self>

Implementors§