Primitive Type bool [-]  [+]

The boolean type

Trait Implementations

impl Not<bool> for bool

fn not(self) -> bool

impl BitAnd<bool, bool> for bool

fn bitand(self, rhs: bool) -> bool

impl BitOr<bool, bool> for bool

fn bitor(self, rhs: bool) -> bool

impl BitXor<bool, bool> for bool

fn bitxor(self, other: bool) -> bool

impl PartialEq<bool> for bool

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

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

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

impl Eq for bool

fn assert_receiver_is_total_eq(&self)

impl PartialOrd<bool> for bool

fn partial_cmp(&self, other: &bool) -> Option<Ordering>

fn lt(&self, &bool) -> bool

fn le(&self, &bool) -> bool

fn gt(&self, &bool) -> bool

fn ge(&self, &bool) -> bool

impl Ord for bool

fn cmp(&self, other: &bool) -> Ordering

impl Clone for bool

fn clone(&self) -> bool

Return a deep copy of the value.

fn clone_from(&mut self, &bool)

impl Default for bool

fn default() -> bool

impl FromStr for bool

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

Parse a bool from a string.

Yields an Option<bool>, because s may or may not actually be parseable.

Examples

fn main() { assert_eq!("true".parse(), Some(true)); assert_eq!("false".parse(), Some(false)); assert_eq!("not even a boolean".parse::<bool>(), None); }
assert_eq!("true".parse(), Some(true));
assert_eq!("false".parse(), Some(false));
assert_eq!("not even a boolean".parse::<bool>(), None);

impl<S: Writer> Hash<S> for bool

fn hash(&self, state: &mut S)

impl Show for bool

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl Rand for bool

fn rand<R: Rng>(rng: &mut R) -> bool