[][src]Trait cfg_expr::expr::Logic

pub trait Logic {
    pub fn top() -> Self;
pub fn bottom() -> Self;
pub fn and(self, other: Self) -> Self;
pub fn or(self, other: Self) -> Self;
pub fn not(self) -> Self; }

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

pub fn top() -> Self[src]

The result of an all operation with no operands, akin to Boolean true.

pub fn bottom() -> Self[src]

The result of an any operation with no operands, akin to Boolean false.

pub fn and(self, other: Self) -> Self[src]

AND, which corresponds to the all operator.

pub fn or(self, other: Self) -> Self[src]

OR, which corresponds to the any operator.

pub fn not(self) -> Self[src]

NOT, which corresponds to the not operator.

Loading content...

Implementations on Foreign Types

impl Logic for bool[src]

A boolean logic.

impl Logic for Option<bool>[src]

A three-valued logic -- None stands for the value being unknown.

The truth tables for this logic are described on Wikipedia.

Loading content...

Implementors

Loading content...