Struct Ready

#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Ready<T>(/* private field */);

Future for the ready function.

Implementations

impl<T> Ready<T>

fn into_inner(self) -> T

Unwraps the value from this immediately ready future.

Trait Implementations

impl<T> FusedFuture for Ready<T>

fn is_terminated(&self) -> bool

impl<T> Future for Ready<T>

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

impl<T> Unpin for Ready<T>

impl<T: Clone> Clone for Ready<T>

fn clone(&self) -> Self

impl<T: Debug> Debug for Ready<T>

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

Auto Trait Implementations

impl<T> Freeze for Ready<T> where Option<T>: Freeze,

impl<T> RefUnwindSafe for Ready<T> where Option<T>: RefUnwindSafe,

impl<T> Send for Ready<T> where Option<T>: Send,

impl<T> Sync for Ready<T> where Option<T>: Sync,

impl<T> UnsafeUnpin for Ready<T> where Option<T>: UnsafeUnpin,

impl<T> UnwindSafe for Ready<T> where Option<T>: UnwindSafe,

Blanket Implementations

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

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

impl<F, T, E> TryFuture for Ready<T> where F: Future<Output = Result<T, E>> + ?Sized,

type Ok = T;
type Error = E;
fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>

impl<Fut> TryFutureExt for Ready<T> where Fut: TryFuture + ?Sized,

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Ready<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for Ready<T> where T: Future + ?Sized,

impl<T> ToOwned for Ready<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Ready<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 Ready<T> where U: Into<T>,

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

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

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