kvarn_async::prelude::compact_str::core::future

Struct Ready

1.48.0 · source
pub struct Ready<T>(/* private fields */);
Expand description

A future that is immediately ready with a value.

This struct is created by ready(). See its documentation for more.

Implementations§

source§

impl<T> Ready<T>

1.82.0 · source

pub fn into_inner(self) -> T

Consumes the Ready, returning the wrapped value.

§Panics

Will panic if this Ready was already polled to completion.

§Examples
use std::future;

let a = future::ready(1);
assert_eq!(a.into_inner(), 1);

Trait Implementations§

1.48.0 · source§

impl<T>