1.36.0[−][src]Enum heim_common::prelude::futures::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.
Implementations
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 const fn is_ready(&self) -> bool
1.36.0 (const: 1.49.0)[src]
Returns true
if this is Poll::Ready
pub const fn is_pending(&self) -> bool
1.36.0 (const: 1.49.0)[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,
poll_map
)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,
poll_map
)Changes the error value of this Poll
with the closure provided.
Trait Implementations
impl<T> Clone for Poll<T> where
T: Clone,
[src]
T: Clone,
impl<T> Copy for Poll<T> where
T: Copy,
[src]
T: Copy,
impl<T> Debug for Poll<T> where
T: Debug,
[src]
T: Debug,
impl<T> Eq for Poll<T> where
T: Eq,
[src]
T: Eq,
impl<T> From<T> for Poll<T>
[src]
impl<T> Hash for Poll<T> where
T: Hash,
[src]
T: Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Ord for Poll<T> where
T: Ord,
[src]
T: Ord,
pub fn cmp(&self, other: &Poll<T>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T> PartialEq<Poll<T>> for Poll<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
[src]
T: PartialOrd<T>,
pub fn partial_cmp(&self, other: &Poll<T>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Poll<T>) -> bool
[src]
pub fn le(&self, other: &Poll<T>) -> bool
[src]
pub fn gt(&self, other: &Poll<T>) -> bool
[src]
pub fn ge(&self, other: &Poll<T>) -> bool
[src]
impl<T> StructuralEq for Poll<T>
[src]
impl<T> StructuralPartialEq for Poll<T>
[src]
impl<T, E> Try for Poll<Result<T, E>>
[src]
type Ok = Poll<T>
try_trait
)The type of this value when viewed as successful.
type Error = E
try_trait
)The type of this value when viewed as failed.
pub fn into_result(
self
) -> Result<<Poll<Result<T, E>> as Try>::Ok, <Poll<Result<T, E>> as Try>::Error>
[src]
self
) -> Result<<Poll<Result<T, E>> as Try>::Ok, <Poll<Result<T, E>> as Try>::Error>
pub fn from_error(e: <Poll<Result<T, E>> as Try>::Error) -> Poll<Result<T, E>>
[src]
pub fn from_ok(x: <Poll<Result<T, E>> as Try>::Ok) -> Poll<Result<T, E>>
[src]
impl<T, E> Try for Poll<Option<Result<T, E>>>
[src]
type Ok = Poll<Option<T>>
try_trait
)The type of this value when viewed as successful.
type Error = E
try_trait
)The type of this value when viewed as failed.
pub fn into_result(
self
) -> Result<<Poll<Option<Result<T, E>>> as Try>::Ok, <Poll<Option<Result<T, E>>> as Try>::Error>
[src]
self
) -> Result<<Poll<Option<Result<T, E>>> as Try>::Ok, <Poll<Option<Result<T, E>>> as Try>::Error>
pub fn from_error(
e: <Poll<Option<Result<T, E>>> as Try>::Error
) -> Poll<Option<Result<T, E>>>
[src]
e: <Poll<Option<Result<T, E>>> as Try>::Error
) -> Poll<Option<Result<T, E>>>
pub fn from_ok(
x: <Poll<Option<Result<T, E>>> as Try>::Ok
) -> Poll<Option<Result<T, E>>>
[src]
x: <Poll<Option<Result<T, E>>> as Try>::Ok
) -> Poll<Option<Result<T, E>>>
Auto Trait Implementations
impl<T> RefUnwindSafe for Poll<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Poll<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Poll<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Poll<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Poll<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,