Skip to main content

FromReady

Trait FromReady 

Source
pub trait FromReady<'a, T>
where T: 'a,
{ // Required method fn from_ready(value: T) -> Self; }
Expand description

A trait for constructing FutureForm-specific types from ready values.

This abstracts over the wrapping operation for values that are already computed, avoiding the overhead and complexity of capturing values in async blocks.

Typically you’ll use FutureForm::ready instead of calling this directly.

Required Methods§

Source

fn from_ready(value: T) -> Self

Create this type from a ready value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T> FromReady<'a, T> for BoxFuture<'a, T>
where T: Send + 'a,

Source§

fn from_ready(value: T) -> Self

Source§

impl<'a, T> FromReady<'a, T> for LocalBoxFuture<'a, T>
where T: 'a,

Source§

fn from_ready(value: T) -> Self

Implementors§