pub trait RunAsync<S: CmdString> {
// Required method
fn run(
&self,
cmd: Cmd<S>
) -> Pin<Box<dyn Future<Output = RunResult<RunOutput, S>> + '_>>;
// Provided methods
fn read_str(
&self,
cmd: Cmd<S>
) -> Pin<Box<dyn Future<Output = RunResult<String, S>> + '_>> { ... }
fn read_bytes(
&self,
cmd: Cmd<S>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RunError<S>>> + '_>> { ... }
}Available on crate feature
async only.Expand description
Trait for running commands asynchronously in an execution environment.