Struct std::future::Pending
pub struct Pending<T> { /* fields omitted */ }
Creates a future which never resolves, representing a computation that never finishes.
This struct
is created by pending()
. See its documentation for more.
Trait Implementations
impl<T> Clone for Pending<T>
pub fn clone(&self) -> Pending<T>
impl<T> Future for Pending<T> type Output = T;
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T> Debug for Pending<T>
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T> Future for Pending<T>
type Output = T
The type of value produced on completion.
pub fn poll(self: Pin<&mut Pending<T>>, &mut Context<'_>) -> Poll<T>
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl<T> Unpin for Pending<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Pending<T> where
T: RefUnwindSafe,
impl<T> Send for Pending<T> where
T: Send,
impl<T> Sync for Pending<T> where
T: Sync,
impl<T> UnwindSafe for Pending<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T
pub fn from(t: T) -> T
Performs the conversion.
pub fn into(self) -> U
Performs the conversion.
type Output = <F as Future>::Output
The output that the future will produce on completion.
type Future = F
Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
Creates a future from a value.
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
#41263)recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
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>
Performs the conversion.
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/future/struct.Pending.html