pub trait Logic {
// Required methods
fn top() -> Self;
fn bottom() -> Self;
fn and(self, other: Self) -> Self;
fn or(self, other: Self) -> Self;
fn not(self) -> Self;
}
Expand description
A propositional logic used to evaluate Expression
instances.
An Expression
consists of some predicates and the any
, all
and not
operators. An
implementation of Logic
defines how the any
, all
and not
operators should be evaluated.
Required Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Logic for Option<bool>
impl Logic for Option<bool>
A three-valued logic – None
stands for the value being unknown.
The truth tables for this logic are described on Wikipedia.