Skip to main content

RunAsyncWith

Trait RunAsyncWith 

Source
pub trait RunAsyncWith<Ctx> {
    type Output;

    // Required method
    fn run_async_with(self, ctx: Ctx) -> impl Future<Output = Self::Output>;
}
Expand description

An async command that is handed something shared when it runs: RunWith, awaited.

A borrowed context is the ordinary case, and the future borrows it for as long as it runs: impl<'a> RunAsyncWith<&'a App> for Install.

Required Associated Types§

Source

type Output

What running the command produces, once awaited.

Required Methods§

Source

fn run_async_with(self, ctx: Ctx) -> impl Future<Output = Self::Output>

Carry out the command, with ctx.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§