pub trait Lattice {
const IDEMPOTENT: bool = true;
// 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
Provided Associated Constants§
Sourceconst IDEMPOTENT: bool = true
const IDEMPOTENT: bool = true
Indicates whether the lattice operations are idempotent for the purpose of evaluating algebraic operations on shared subtries.
If IDEMPOTENT = true the implementor is asserting that:
pjoin(self) -> AlgebraicResult::Identity(SELF_IDENT | COUNTER_IDENT),
join_into(self) -> AlgebraicStatus::Identity,
pmeet(self) -> AlgebraicResult::Identity(SELF_IDENT | COUNTER_IDENT),
WARNING! This constant is currently informational only. The node-level and zipper algebra implementations do not yet consult it, so changing it has no effect on their behavior. It is planned for gating implementation shortcuts in the future
Required Methods§
Sourcefn pjoin(&self, other: &Self) -> AlgebraicResult<Self>where
Self: Sized,
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
Sourcefn pmeet(&self, other: &Self) -> AlgebraicResult<Self>where
Self: Sized,
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§
Sourcefn join_into(&mut self, other: Self) -> AlgebraicStatuswhere
Self: Sized,
fn join_into(&mut self, other: Self) -> AlgebraicStatuswhere
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
fn join_all<S: AsRef<Self>, Args: AsRef<[S]>>(xs: Args) -> AlgebraicResult<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".