Enum task_kit::task::State
[−]
[src]
pub enum State<T = (), E = ()> { Pending, Resolve(T), Resolved, Reject(E), Rejected, }
Variants
Pending
Resolve(T)
Resolved
Reject(E)
Rejected
Methods
impl<T, E> State<T, E>
[src]
fn is_pending(&self) -> bool
[src]
fn is_resolve(&self) -> bool
[src]
fn is_resolved(&self) -> bool
[src]
fn is_reject(&self) -> bool
[src]
fn is_rejected(&self) -> bool
[src]
fn resolve(self) -> Option<T>
[src]
fn reject(self) -> Option<E>
[src]
fn as_ref(&self) -> State<&T, &E>
[src]
fn as_mut(&mut self) -> State<&mut T, &mut E>
[src]
fn into_result(self) -> Option<Result<T, E>>
[src]
fn map<U, F>(self, op: F) -> State<U, E> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
fn map_err<F, O>(self, op: F) -> State<T, O> where
F: FnOnce(E) -> O,
[src]
F: FnOnce(E) -> O,
fn and<U>(self, res: State<U, E>) -> State<U, E>
[src]
fn and_then<U, F>(self, op: F) -> State<U, E> where
F: FnOnce(T) -> State<U, E>,
[src]
F: FnOnce(T) -> State<U, E>,
fn or<O>(self, res: State<T, O>) -> State<T, O>
[src]
fn or_else<O, F>(self, op: F) -> State<T, O> where
F: FnOnce(E) -> State<T, O>,
[src]
F: FnOnce(E) -> State<T, O>,
fn unwrap_or(self, or: T) -> T
[src]
fn unwrap_or_else<F>(self, f: F) -> T where
F: FnOnce() -> T,
[src]
F: FnOnce() -> T,
fn take(&mut self) -> State<T, E>
[src]
impl<T, E> State<T, E> where
E: Debug,
[src]
E: Debug,
impl<T, E> State<T, E> where
T: Debug,
[src]
T: Debug,
fn unwrap_reject(self) -> E
[src]
fn expect_reject(self, msg: &str) -> E
[src]
impl<T, E> State<T, E> where
T: Default,
[src]
T: Default,
fn unwrap_or_default(self) -> T
[src]
impl<T, E> State<T, E> where
T: Clone,
E: Clone,
[src]
T: Clone,
E: Clone,
fn clone(self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
[src]
Trait Implementations
impl<T: Clone, E: Clone> Clone for State<T, E>
[src]
fn clone(&self) -> State<T, E>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy, E: Copy> Copy for State<T, E>
[src]
impl<T: PartialEq, E: PartialEq> PartialEq for State<T, E>
[src]
fn eq(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests for !=
.
impl<T: PartialOrd, E: PartialOrd> PartialOrd for State<T, E>
[src]
fn partial_cmp(&self, __arg_0: &State<T, E>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &State<T, E>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Eq, E: Eq> Eq for State<T, E>
[src]
impl<T: Ord, E: Ord> Ord for State<T, E>
[src]
fn cmp(&self, __arg_0: &State<T, E>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl<T: Hash, E: Hash> Hash for State<T, E>
[src]
fn hash<__HTE: Hasher>(&self, __arg_0: &mut __HTE)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more