Struct AlwaysReady

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

Future for the always_ready function.

Trait Implementations

impl<T, F: Fn() -> T + Clone> Clone for AlwaysReady<T, F>

fn clone(&self) -> Self

impl<T, F: Fn() -> T + Copy> Copy for AlwaysReady<T, F>

impl<T, F: Fn() -> T> Debug for AlwaysReady<T, F>

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

impl<T, F: Fn() -> T> FusedFuture for AlwaysReady<T, F>

fn is_terminated(&self) -> bool

impl<T, F: Fn() -> T> Future for AlwaysReady<T, F>

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

impl<T, F: Fn() -> T> Unpin for AlwaysReady<T, F>

Auto Trait Implementations

impl<T, F> Freeze for AlwaysReady<T, F> where F: Freeze,

impl<T, F> RefUnwindSafe for AlwaysReady<T, F> where F: RefUnwindSafe,

impl<T, F> Send for AlwaysReady<T, F> where F: Send,

impl<T, F> Sync for AlwaysReady<T, F> where F: Sync,

impl<T, F> UnsafeUnpin for AlwaysReady<T, F> where F: UnsafeUnpin,

impl<T, F> UnwindSafe for AlwaysReady<T, F> where F: UnwindSafe,

Blanket Implementations

impl<F> IntoFuture for AlwaysReady<T, F> 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 AlwaysReady<T, F> 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 AlwaysReady<T, F> where Fut: TryFuture + ?Sized,

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for AlwaysReady<T, F> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for AlwaysReady<T, F> where T: ?Sized,

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

impl<T> CloneToUninit for AlwaysReady<T, F> where T: Clone,

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

impl<T> From<T> for AlwaysReady<T, F>

fn from(t: T) -> T

Returns the argument unchanged.

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

impl<T> ToOwned for AlwaysReady<T, F> where T: Clone,

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

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

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

impl<T, U> TryInto<U> for AlwaysReady<T, F> where U: TryFrom<T>,

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