Struct async_ffi::LocalFfiFuture[][src]

#[repr(C)]
pub struct LocalFfiFuture<T> { /* fields omitted */ }

The FFI compatible future type without Send bound.

Non-Send Futures can only be converted into LocalFfiFuture. It is not able to be spawnd in a multi-threaded runtime, but is useful for thread-local futures, single-threaded runtimes, or single-threaded targets like wasm.

See module level documentation for more details.

Implementations

impl<T: 'static> LocalFfiFuture<T>[src]

pub fn new<F: Future<Output = T> + 'static>(fut: F) -> Self[src]

Convert a Rust Future into a FFI-compatible LocalFfiFuture.

Usually into_local_ffi is preferred and is identical to this method.

Trait Implementations

impl<T> Drop for LocalFfiFuture<T>[src]

impl<T> Future for LocalFfiFuture<T>[src]

type Output = T

The type of value produced on completion.

Auto Trait Implementations

impl<T> RefUnwindSafe for LocalFfiFuture<T>

impl<T> !Send for LocalFfiFuture<T>

impl<T> !Sync for LocalFfiFuture<T>

impl<T> Unpin for LocalFfiFuture<T>

impl<T> UnwindSafe for LocalFfiFuture<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<F> FutureExt for F where
    F: Future + 'static, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.