5 unstable releases
0.3.0 | Dec 11, 2021 |
---|---|
0.2.0 | Sep 4, 2017 |
0.1.2 | Jul 17, 2017 |
0.1.1 | Jul 10, 2017 |
0.1.0 | Jul 9, 2017 |
#1548 in Math
32 downloads per month
Used in ferrischat_common
23KB
530 lines
tribool
Three-valued logic in Rust. Partially inspired by Boost Tribool.
Use the serde
feature to enable Serde (de)serialization support using null
values as indeterminate states.
See the Wikipedia page for more information.
lib.rs
:
Three-valued / Three-state logic
Three-valued logic is an extension to Boolean logic with three values indicated True, False and some Indeterminate third value.
Because of the limitations of logical operator overloading in Rust, AND, OR and XOR operations
are implemented with the bitwise &
, |
and ^
operators.
For more information and the full truth tables of this implementation, see the Wikipedia page
Dependencies
~170KB