Trait MistyAsyncTaskTrait

Source
pub trait MistyAsyncTaskTrait:
    Sized
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn spawn_once<'a, T, E>(
        cx: impl AsMistyClientHandle<'a>,
        future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + Send + Sync + 'static,
    )
       where T: Future<Output = Result<(), E>> + Send + 'static,
             E: Display { ... }
    fn spawn<'a, T, E>(
        cx: impl AsMistyClientHandle<'a>,
        future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + Send + Sync + 'static,
    )
       where T: Future<Output = Result<(), E>> + Send + 'static,
             E: Display { ... }
    fn spawn_local_once<'a, T, E>(
        cx: impl AsMistyClientHandle<'a>,
        future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + 'static,
    )
       where T: Future<Output = Result<(), E>> + 'static,
             E: Display { ... }
    fn spawn_local<'a, T, E>(
        cx: impl AsMistyClientHandle<'a>,
        future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + 'static,
    )
       where T: Future<Output = Result<(), E>> + 'static,
             E: Display { ... }
    fn cancel_all<'a>(cx: impl AsMistyClientHandle<'a>) { ... }
}

Provided Methods§

Source

fn spawn_once<'a, T, E>( cx: impl AsMistyClientHandle<'a>, future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + Send + Sync + 'static, )
where T: Future<Output = Result<(), E>> + Send + 'static, E: Display,

Source

fn spawn<'a, T, E>( cx: impl AsMistyClientHandle<'a>, future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + Send + Sync + 'static, )
where T: Future<Output = Result<(), E>> + Send + 'static, E: Display,

Source

fn spawn_local_once<'a, T, E>( cx: impl AsMistyClientHandle<'a>, future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + 'static, )
where T: Future<Output = Result<(), E>> + 'static, E: Display,

Source

fn spawn_local<'a, T, E>( cx: impl AsMistyClientHandle<'a>, future_fn: impl FnOnce(MistyAsyncTaskContext) -> T + 'static, )
where T: Future<Output = Result<(), E>> + 'static, E: Display,

Source

fn cancel_all<'a>(cx: impl AsMistyClientHandle<'a>)

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.

Implementors§