[−][src]Module type_freak::boolean
Trait level boolean algebra.
This module reuses True and False types from typenum. It provides common logic arithmetic boolean operators: Not, And, Or, Xor and Iff.
use typenum::{True, False}; use type_freak::boolean::*; type L = True; type R = False; type R1 = Not<L>; // False type R2 = And<L, R>; // False type R3 = Or<L, R>; // True type R4 = Xor<L, R>; // True type R5 = Iff<L, R>; // False type R6 = Imply<L, R>; // False type R7 = NotImply<L, R>; // True fn get_value() -> bool { R1::BOOL // Get constant value }
Structs
AndComposePredicate | A Predicate that meets input pair |
AndPredicate | |
IffComposePredicate | A Predicate that returns if pair of input types |
IffPredicate | A Predicate that returns of both input and |
ImplyComposePredicate | A Predicate that computes if |
ImplyPredicate | A Predicate that returns if input implies to |
NotImplyComposePredicate | A Predicate that computes if |
NotImplyPredicate | A Predicate that returns if input is true while |
NotPredicate | |
OrComposePredicate | A Predicate that joins input pair |
OrPredicate | |
XorComposePredicate | A Predicate that computes exclusive-or on input pair |
XorPredicate | A Predicate that computes exclusive-or on input and |
Traits
Boolean | A trait that provides boolean constant value. |
Type Definitions
And | |
AndCompose | |
Iff | |
IffCompose | |
Imply | |
ImplyCompose | |
Not | |
NotImply | |
NotImplyCompose | |
Or | |
OrCompose | |
Xor | |
XorCompose |