Trait linera_base::command::CommandExt

source ·
pub trait CommandExt: Debug {
    // Required methods
    fn spawn_into(&mut self) -> Result<Child>;
    fn spawn_and_wait_for_stdout<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn spawn_and_wait<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn description(&self) -> String { ... }
}
Expand description

Extension trait for tokio::process::Command.

Required Methods§

source

fn spawn_into(&mut self) -> Result<Child>

Similar to tokio::process::Command::spawn but sets kill_on_drop to true. Errors are tagged with a description of the command.

source

fn spawn_and_wait_for_stdout<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Similar to tokio::process::Command::output but does not capture stderr and returns the stdout as a string. Errors are tagged with a description of the command.

source

fn spawn_and_wait<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Spawns and waits for process to finish executing. Will not wait for stdout, use spawn_and_wait_for_stdout for that

Provided Methods§

source

fn description(&self) -> String

Description used for error reporting.

Implementations on Foreign Types§

source§

impl CommandExt for Command

source§

fn spawn_into(&mut self) -> Result<Child>

source§

fn spawn_and_wait_for_stdout<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn spawn_and_wait<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§