Struct core::future::Pending

1.48.0 · source ·
pub struct Pending<T> { /* private fields */ }
Expand description

创建一个永不解析的 future,表示永不结束的计算。

structpending() 创建。有关更多信息,请参见其文档。

Trait Implementations§

source§

impl<T> Clone for Pending<T>

source§

fn clone(&self) -> Self

返回值的副本。 Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

source 执行复制分配。 Read more
source§

impl<T> Debug for Pending<T>

source§

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

使用给定的格式化程序格式化该值。 Read more
source§

impl<T> Future for Pending<T>

§

type Output = T

完成时产生的值类型。
source§

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

尝试将 future 解析为最终值,如果该值尚不可用,请注册当前任务以进行唤醒。 Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Pending<T>

§

impl<T> Send for Pending<T>

§

impl<T> Sync for Pending<T>

§

impl<T> Unpin for Pending<T>

§

impl<T> UnwindSafe for Pending<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

获取 selfTypeIdRead more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

从拥有的值中一成不变地借用。 Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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

从拥有的值中借用。 Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

返回未更改的参数。

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

调用 U::from(self)

也就是说,这种转换是 From<T> for U 实现选择执行的任何操作。

source§

impl<F> IntoFuture for Fwhere F: Future,

§

type Output = <F as Future>::Output

future 完成时将产生的输出。
§

type IntoFuture = F

我们要把它变成哪种 future?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

根据一个值创建一个 future。 Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

发生转换错误时返回的类型。
source§

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

执行转换。
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

发生转换错误时返回的类型。
source§

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

执行转换。