Boolean logic
of FromStr for bool
- Parse logic value from s
of cmp::Eq for bool
all_values
- Iterates over all truth values by passing them to blk
in an unspecified orderand
- Conjunctioneq
- true if truth values a
and b
are indistinguishable in the logicimplies
- Implication in the logic, iis_false
- true if v
represents falsehood in the logicis_true
- true if v
represents truth in the logicne
- true if truth values a
and b
are distinguishable in the logicnot
- Negation / inverseor
- Disjunctionto_bit
- converts truth value to an 8 bit byteto_str
- Convert v
into a stringxor
- Exclusive orFromStr
for bool
Parse logic value from s
from_str
fn from_str(s: &str) -> Option<bool>
cmp::Eq
for bool
eq
fn eq(&self, other: &bool) -> bool
ne
fn ne(&self, other: &bool) -> bool
all_values
fn all_values(blk: &fn(v: bool))
Iterates over all truth values by passing them to blk
in an unspecified order
and
fn and(a: bool, b: bool) -> bool
Conjunction
eq
fn eq(a: bool, b: bool) -> bool
true if truth values a
and b
are indistinguishable in the logic
implies
fn implies(a: bool, b: bool) -> bool
Implication in the logic, i.e. from a
follows b
is_false
fn is_false(v: bool) -> bool
true if v
represents falsehood in the logic
is_true
fn is_true(v: bool) -> bool
true if v
represents truth in the logic
ne
fn ne(a: bool, b: bool) -> bool
true if truth values a
and b
are distinguishable in the logic
not
fn not(v: bool) -> bool
Negation / inverse
or
fn or(a: bool, b: bool) -> bool
Disjunction
to_bit
fn to_bit(v: bool) -> u8
converts truth value to an 8 bit byte
to_str
fn to_str(v: bool) -> ~str
Convert v
into a string
xor
fn xor(a: bool, b: bool) -> bool
Exclusive or
Identical to or(and(a, not(b)), and(not(a), b))