Skip to main content

FutureExt

Trait FutureExt 

Source
pub trait FutureExt: Future + Sized {
    // Provided methods
    fn into_ffi<'a>(self) -> BorrowingFfiFuture<'a, Self::Output> 
       where Self: Send + 'a { ... }
    fn into_local_ffi<'a>(self) -> LocalBorrowingFfiFuture<'a, Self::Output> 
       where Self: 'a { ... }
}
Expand description

Helper trait to provide conversion from Future to FfiFuture or LocalFfiFuture.

See module level documentation for more details.

Provided Methods§

Source

fn into_ffi<'a>(self) -> BorrowingFfiFuture<'a, Self::Output>
where Self: Send + 'a,

Convert a Rust Future implementing Send into a FFI-compatible FfiFuture.

Source

fn into_local_ffi<'a>(self) -> LocalBorrowingFfiFuture<'a, Self::Output>
where Self: 'a,

Convert a Rust Future into a FFI-compatible LocalFfiFuture.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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