[−][src]Enum futures_core::task::Poll
🔬 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][−]
pub fn map<U, F>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U,
[src][−]
F: FnOnce(T) -> U,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Changes the ready value of this Poll
with the closure provided.
pub fn is_ready(&self) -> bool
[src][−]
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Returns true
if this is Poll::Ready
pub fn is_pending(&self) -> bool
[src][−]
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
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,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
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,
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Changes the error value of this Poll
with the closure provided.
Trait Implementations
impl<T> Debug for Poll<T> where
T: Debug,
[src][+]
T: Debug,
impl<T> Clone for Poll<T> where
T: Clone,
[src][+]
T: Clone,
impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
[src][+]
T: PartialOrd<T>,
impl<T> Ord for Poll<T> where
T: Ord,
[src][+]
T: Ord,
impl<T> Eq for Poll<T> where
T: Eq,
[src]
T: Eq,
impl<T> PartialEq<Poll<T>> for Poll<T> where
T: PartialEq<T>,
[src][+]
T: PartialEq<T>,
impl<T> From<T> for Poll<T>
[src][+]
impl<T, E> Try for Poll<Result<T, E>>
[src][+]
impl<T, E> Try for Poll<Option<Result<T, E>>>
[src][+]
impl<T> Copy for Poll<T> where
T: Copy,
[src]
T: Copy,
impl<T> Hash for Poll<T> where
T: Hash,
[src][+]
T: Hash,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][−]
T: Clone,
impl<T> From for T
[src][−]
impl<T, U> TryFrom for T where
U: Into<T>,
[src][−]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
impl<T> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,