Enum partial::Partial [−][src]
pub enum Partial<T> { Value(T), Fake(T), Nothing, }
Variants
Value(T)
Fake(T)
Nothing
Methods
impl<T> Partial<T>
[src]
impl<T> Partial<T>
pub fn unwrap(self) -> T
[src]
pub fn unwrap(self) -> T
pub fn unwrap_all(self) -> T
[src]
pub fn unwrap_all(self) -> T
pub fn expect(self, msg: &str) -> T
[src]
pub fn expect(self, msg: &str) -> T
pub fn ensure(self, msg: &str) -> Self
[src]
pub fn ensure(self, msg: &str) -> Self
pub fn unwrap_or_else<F>(self, f: F) -> T where
F: FnOnce() -> T,
[src]
pub fn unwrap_or_else<F>(self, f: F) -> T where
F: FnOnce() -> T,
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Partial<U>
[src]
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Partial<U>
pub fn and_then<U, F: FnOnce(T) -> Partial<U>>(self, f: F) -> Partial<U>
[src]
pub fn and_then<U, F: FnOnce(T) -> Partial<U>>(self, f: F) -> Partial<U>
pub fn and_next<U, F: FnOnce(T) -> Partial<U>>(self, f: F) -> Partial<U>
[src]
pub fn and_next<U, F: FnOnce(T) -> Partial<U>>(self, f: F) -> Partial<U>
pub fn is_value(&self) -> bool
[src]
pub fn is_value(&self) -> bool
pub fn is_fake(&self) -> bool
[src]
pub fn is_fake(&self) -> bool
pub fn is_nothing(&self) -> bool
[src]
pub fn is_nothing(&self) -> bool
Trait Implementations
impl<T: Clone> Clone for Partial<T>
[src]
impl<T: Clone> Clone for Partial<T>
fn clone(&self) -> Partial<T>
[src]
fn clone(&self) -> Partial<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Partial<T>
[src]
impl<T: PartialEq> PartialEq for Partial<T>
fn eq(&self, other: &Partial<T>) -> bool
[src]
fn eq(&self, other: &Partial<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Partial<T>) -> bool
[src]
fn ne(&self, other: &Partial<T>) -> bool
This method tests for !=
.
impl<T: PartialOrd> PartialOrd for Partial<T>
[src]
impl<T: PartialOrd> PartialOrd for Partial<T>
fn partial_cmp(&self, other: &Partial<T>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Partial<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Partial<T>) -> bool
[src]
fn lt(&self, other: &Partial<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Partial<T>) -> bool
[src]
fn le(&self, other: &Partial<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Partial<T>) -> bool
[src]
fn gt(&self, other: &Partial<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Partial<T>) -> bool
[src]
fn ge(&self, other: &Partial<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Eq> Eq for Partial<T>
[src]
impl<T: Eq> Eq for Partial<T>
impl<T: Ord> Ord for Partial<T>
[src]
impl<T: Ord> Ord for Partial<T>
fn cmp(&self, other: &Partial<T>) -> Ordering
[src]
fn cmp(&self, other: &Partial<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: Debug> Debug for Partial<T>
[src]
impl<T: Debug> Debug for Partial<T>