Primitive Type bool

The boolean type

Trait Implementations

impl Rand for bool

fn rand<R: Rng>(rng: &mut R) -> 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!(from_str::<bool>("true"), Some(true)); assert_eq!(from_str::<bool>("false"), Some(false)); assert_eq!(from_str::<bool>("not even a boolean"), None); }
assert_eq!(from_str::<bool>("true"), Some(true));
assert_eq!(from_str::<bool>("false"), Some(false));
assert_eq!(from_str::<bool>("not even a boolean"), None);

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 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 for bool

fn lt(&self, other: &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 Bool for bool

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

impl<'a> Show for bool

fn fmt<'a>(&self, f: &mut Formatter) -> Result<(), FormatError>

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

fn hash<S: Writer>(&self, state: &mut S)