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

#1273 in Math

Download history 5/week @ 2024-02-05 5/week @ 2024-02-12 84/week @ 2024-02-19 111/week @ 2024-02-26 57/week @ 2024-03-04 26/week @ 2024-03-11 41/week @ 2024-03-18

246 downloads per month
Used in ferrischat_common

MIT license

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

~180KB