pub trait RunAsync<S: CmdString + Send + Sync>: Sync {
// Required method
fn run(
&self,
cmd: Cmd<S>,
) -> impl Send + Future<Output = RunResult<RunOutput, S>>;
// Provided methods
fn read_str(
&self,
cmd: Cmd<S>,
) -> impl Send + Future<Output = RunResult<String, S>> { ... }
fn read_bytes(
&self,
cmd: Cmd<S>,
) -> impl Send + Future<Output = RunResult<Vec<u8>, S>> { ... }
}Available on crate feature
async only.Expand description
Trait for running commands asynchronously in an execution environment.
Required Methods§
Provided Methods§
fn read_str( &self, cmd: Cmd<S>, ) -> impl Send + Future<Output = RunResult<String, S>>
fn read_bytes( &self, cmd: Cmd<S>, ) -> impl Send + Future<Output = RunResult<Vec<u8>, S>>
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.