Enum futures::task::Poll [−][src]
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
Variants
Ready(T)
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Represents that a value is immediately ready.
Pending
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
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]
[−]
impl<T> Poll<T>
pub fn map<U, F>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U,
[src]
[−]
pub fn map<U, F>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change the ready value of this Poll
with the closure provided
pub fn is_ready(&self) -> bool
[src]
[−]
pub fn is_ready(&self) -> bool
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Returns whether this is Poll::Ready
pub fn is_pending(&self) -> bool
[src]
[−]
pub fn is_pending(&self) -> bool
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Returns whether this is Poll::Pending
impl<T, E> Poll<Result<T, E>>
[src]
[−]
impl<T, E> Poll<Result<T, E>>
pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>> where
F: FnOnce(T) -> U,
[src]
[−]
pub fn map_ok<U, F>(self, f: F) -> Poll<Result<U, E>> where
F: FnOnce(T) -> U,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change 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]
[−]
pub fn map_err<U, F>(self, f: F) -> Poll<Result<T, U>> where
F: FnOnce(E) -> U,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change the error value of this Poll
with the closure provided
Trait Implementations
impl<T> Clone for Poll<T> where
T: Clone,
[src]
[+]
impl<T> Clone for Poll<T> where
T: Clone,
impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
[src]
[+]
impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
impl<T> Eq for Poll<T> where
T: Eq,
[src]
impl<T> Eq for Poll<T> where
T: Eq,
impl<T> Hash for Poll<T> where
T: Hash,
[src]
[+]
impl<T> Hash for Poll<T> where
T: Hash,
impl<T> Debug for Poll<T> where
T: Debug,
[src]
[+]
impl<T> Debug for Poll<T> where
T: Debug,
impl<T> From<T> for Poll<T>
[src]
[+]
impl<T> From<T> for Poll<T>
impl<T> Ord for Poll<T> where
T: Ord,
[src]
[+]
impl<T> Ord for Poll<T> where
T: Ord,
impl<T> PartialEq<Poll<T>> for Poll<T> where
T: PartialEq<T>,
[src]
[+]
impl<T> PartialEq<Poll<T>> for Poll<T> where
T: PartialEq<T>,
impl<T> Copy for Poll<T> where
T: Copy,
[src]
impl<T> Copy for Poll<T> where
T: Copy,