1.36.0[−][src]Enum core::task::Poll
Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
Variants
Represents that a value is immediately ready.
Represents that a value is not ready yet.
When a function returns Pending
, the function must also
ensure that the current task is scheduled to be awoken when
progress can be made.
Methods
impl<T> Poll<T>
[src]
pub fn map<U, F>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Changes the ready value of this Poll
with the closure provided.
pub fn is_ready(&self) -> bool
[src]
Returns true
if this is Poll::Ready
pub fn is_pending(&self) -> bool
[src]
Returns true
if this is Poll::Pending
impl<T, E> Poll<Result<T, E>>
[src]
pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Changes the success value of this Poll
with the closure provided.
pub fn map_err<U, F>(self, f: F) -> Poll<Result<T, U>> where
F: FnOnce(E) -> U,
[src]
F: FnOnce(E) -> U,
Changes the error value of this Poll
with the closure provided.
impl<T, E> Poll<Option<Result<T, E>>>
[src]
pub fn map_ok<U, F>(self, f: F) -> Poll<Option<Result<U, E>>> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Changes the success value of this Poll
with the closure provided.
pub fn map_err<U, F>(self, f: F) -> Poll<Option<Result<T, U>>> where
F: FnOnce(E) -> U,
[src]
F: FnOnce(E) -> U,
Changes the error value of this Poll
with the closure provided.
Trait Implementations
impl<T: Copy> Copy for Poll<T>
[src]
impl<T, E> Try for Poll<Result<T, E>>
[src]
type Ok = Poll<T>
The type of this value when viewed as successful.
type Error = E
The type of this value when viewed as failed.
fn into_result(self) -> Result<Self::Ok, Self::Error>
[src]
fn from_error(e: Self::Error) -> Self
[src]
fn from_ok(x: Self::Ok) -> Self
[src]
impl<T, E> Try for Poll<Option<Result<T, E>>>
[src]
type Ok = Poll<Option<T>>
The type of this value when viewed as successful.
type Error = E
The type of this value when viewed as failed.
fn into_result(self) -> Result<Self::Ok, Self::Error>
[src]
fn from_error(e: Self::Error) -> Self
[src]
fn from_ok(x: Self::Ok) -> Self
[src]
impl<T: PartialEq> PartialEq<Poll<T>> for Poll<T>
[src]
impl<T: Eq> Eq for Poll<T>
[src]
impl<T: Ord> Ord for Poll<T>
[src]
fn cmp(&self, other: &Poll<T>) -> Ordering
[src]
fn max(self, other: Self) -> Self where
Self: Sized,
1.21.0[src]
Self: Sized,
fn min(self, other: Self) -> Self where
Self: Sized,
1.21.0[src]
Self: Sized,
fn clamp(self, min: Self, max: Self) -> Self where
Self: Sized,
[src]
Self: Sized,
impl<T: PartialOrd> PartialOrd<Poll<T>> for Poll<T>
[src]
fn partial_cmp(&self, other: &Poll<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Poll<T>) -> bool
[src]
fn le(&self, other: &Poll<T>) -> bool
[src]
fn gt(&self, other: &Poll<T>) -> bool
[src]
fn ge(&self, other: &Poll<T>) -> bool
[src]
impl<T: Clone> Clone for Poll<T>
[src]
fn clone(&self) -> Poll<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> From<T> for Poll<T>
[src]
impl<T: Hash> Hash for Poll<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H: Hasher>(data: &[Self], state: &mut H) where
Self: Sized,
1.3.0[src]
Self: Sized,
impl<T: Debug> Debug for Poll<T>
[src]
Auto Trait Implementations
impl<T> Send for Poll<T> where
T: Send,
T: Send,
impl<T> Sync for Poll<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Poll<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,