Boolean logic

Implementation of FromStr for bool

Parse logic value from s

Method from_str

fn from_str(s: &str) -> Option<bool>

Implementation of cmp::Eq for bool

Method eq

fn eq(&self, other: &bool) -> bool

Method ne

fn ne(&self, other: &bool) -> bool

Function all_values

fn all_values(blk: &fn(v: bool))

Iterates over all truth values by passing them to blk in an unspecified order

Function and

fn and(a: bool, b: bool) -> bool

Conjunction

Function eq

fn eq(a: bool, b: bool) -> bool

true if truth values a and b are indistinguishable in the logic

Function implies

fn implies(a: bool, b: bool) -> bool

Implication in the logic, i.e. from a follows b

Function is_false

fn is_false(v: bool) -> bool

true if v represents falsehood in the logic

Function is_true

fn is_true(v: bool) -> bool

true if v represents truth in the logic

Function ne

fn ne(a: bool, b: bool) -> bool

true if truth values a and b are distinguishable in the logic

Function not

fn not(v: bool) -> bool

Negation / inverse

Function or

fn or(a: bool, b: bool) -> bool

Disjunction

Function to_bit

fn to_bit(v: bool) -> u8

converts truth value to an 8 bit byte

Function to_str

fn to_str(v: bool) -> ~str

Convert v into a string

Function xor

fn xor(a: bool, b: bool) -> bool

Exclusive or

Identical to or(and(a, not(b)), and(not(a), b))