Trait xscript::RunAsync

source ·
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.

Required Methods§

source

fn run( &self, cmd: Cmd<S> ) -> Pin<Box<dyn Future<Output = RunResult<RunOutput, S>> + '_>>

Provided Methods§

source

fn read_str( &self, cmd: Cmd<S> ) -> Pin<Box<dyn Future<Output = RunResult<String, S>> + '_>>

source

fn read_bytes( &self, cmd: Cmd<S> ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RunError<S>>> + '_>>

Implementors§

source§

impl RunAsync<OsString> for LocalEnv

Available on crate feature tokio only.