Enum optional::OptionBool
[−]
[src]
pub enum OptionBool { SomeTrue, SomeFalse, None, }
Variants
SomeTrue
SomeFalse
None
Methods
impl OptionBool
[src]
fn is_some(&self) -> bool
fn is_none(&self) -> bool
fn expect(&self, msg: &str) -> bool
fn unwrap(&self) -> bool
fn unwrap_or(&self, def: bool) -> bool
fn unwrap_or_else<F>(self, f: F) -> bool where F: FnOnce() -> bool
fn map<U, F>(self, f: F) -> Option<U> where F: FnOnce(bool) -> U
fn map_bool<F>(self, f: F) -> OptionBool where F: FnOnce(bool) -> bool
fn map_or<U, F>(self, default: U, f: F) -> U where F: FnOnce(bool) -> U
fn map_or_else<U, D, F>(self, default: D, f: F) -> U where D: FnOnce() -> U, F: FnOnce(bool) -> U
fn ok_or<E>(self, err: E) -> Result<bool, E>
fn ok_or_else<E, F>(self, err: F) -> Result<bool, E> where F: FnOnce() -> E
fn and<U>(self, optb: Option<U>) -> Option<U>
fn and_bool(self, optb: OptionBool) -> OptionBool
fn and_then<U, F>(self, f: F) -> Option<U> where F: FnOnce(bool) -> Option<U>
fn and_then_bool<F>(self, f: F) -> OptionBool where F: FnOnce(bool) -> OptionBool
fn or(self, optb: Option<bool>) -> Option<bool>
fn or_bool(self, optb: OptionBool) -> OptionBool
fn or_else<F>(self, f: F) -> Option<bool> where F: FnOnce() -> Option<bool>
fn or_else_bool<F>(self, f: F) -> OptionBool where F: FnOnce() -> OptionBool
fn iter(&self) -> Iter
fn take(&mut self) -> Option<bool>
Trait Implementations
impl Hash for OptionBool
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl Ord for OptionBool
[src]
fn cmp(&self, __arg_0: &OptionBool) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl Eq for OptionBool
[src]
impl Clone for OptionBool
[src]
fn clone(&self) -> OptionBool
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for OptionBool
[src]
impl PartialEq for OptionBool
[src]
fn eq(&self, other: &OptionBool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<OptionBool> for &'a OptionBool
[src]
fn eq(&self, other: &OptionBool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd for OptionBool
[src]
fn partial_cmp(&self, other: &OptionBool) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for OptionBool
[src]
impl Default for OptionBool
[src]
fn default() -> OptionBool
Returns the "default value" for a type. Read more