Struct Pending

#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Pending<T> { pub(in ::future::pending) _data: PhantomData<fn() -> T> }

Creates a future which never resolves, representing a computation that never finishes.

This struct is created by [pending()]. See its documentation for more.

Fields

_data: PhantomData<fn() -> T>

Trait Implementations

impl<T> Clone for Pending<T>

fn clone(&self) -> Self

impl<T> Debug for Pending<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T> Future for Pending<T>

type Output = T;
fn poll(self: Pin<&mut Self>, &mut Context<'_>) -> Poll<T>

Auto Trait Implementations

impl<T> Freeze for Pending<T> where PhantomData<fn() -> T>: Freeze,

impl<T> RefUnwindSafe for Pending<T> where PhantomData<fn() -> T>: RefUnwindSafe,

impl<T> Send for Pending<T> where PhantomData<fn() -> T>: Send,

impl<T> Sync for Pending<T> where PhantomData<fn() -> T>: Sync,

impl<T> Unpin for Pending<T> where PhantomData<fn() -> T>: Unpin,

impl<T> UnsafeUnpin for Pending<T> where PhantomData<fn() -> T>: UnsafeUnpin,

impl<T> UnwindSafe for Pending<T> where PhantomData<fn() -> T>: UnwindSafe,

Blanket Implementations

impl<F> IntoFuture for Pending<T> where F: Future,

type Output = <F as Future>::Output;
type IntoFuture = F;
fn into_future(self) -> <F as IntoFuture>::IntoFuture

impl<T> Any for Pending<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Pending<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Pending<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Pending<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Pending<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Pending<T> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Pending<T>

impl<T, U> Into<U> for Pending<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Pending<T> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Pending<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>