IntoDartFuture

Trait IntoDartFuture 

Source
pub trait IntoDartFuture {
    type Output;

    // Required method
    fn into_dart_future(self) -> DartFuture<Self::Output>;
}
Expand description

Extension trait for a Future allowing to convert Rust Futures into DartFutures.

Required Associated Types§

Source

type Output

Type of the value produced on the DartFuture’s completion.

Required Methods§

Source

fn into_dart_future(self) -> DartFuture<Self::Output>

Converts this Future into a Dart Future.

Returns a Dart_Handle to the created Dart Future.

NOTE: The Dart Future execution begins immediately and cannot be canceled.

Implementors§

Source§

impl<Fut, Ok, Err> IntoDartFuture for Fut
where Fut: Future<Output = Result<Ok, Err>> + 'static, Ok: Into<DartValue> + 'static, Err: Into<Error>,

Source§

type Output = <Fut as Future>::Output