The bool
module contains useful code to help work with boolean values.
A quick summary:
bool
Implementations of the following traits:
FromStr
ToStr
Not
Ord
TotalOrd
Eq
Default
Zero
bool
sAll of the standard comparison functions one would expect: and
, eq
, or
,
and more.
Also, a few conversion functions: to_bit
and to_str
.
Finally, some inquiries into the nature of truth: is_true
and is_false
.
all_values | Iterates over all truth values, passing them to the given block. |
and | Conjunction of two boolean values. |
implies | Implication between two boolean values. |
is_false | Is a given boolean value false? |
is_true | Is a given boolean value true? |
not | Negation of a boolean value. |
or | Disjunction of two boolean values. |
to_bit | Convert a |
xor | An 'exclusive or' of two boolean values. |
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).