Trait hydro_deploy::LaunchedBinary

source ·
pub trait LaunchedBinary: Send + Sync {
    // Required methods
    fn stdin(&self) -> UnboundedSender<String>;
    fn deploy_stdout(&self) -> Receiver<String>;
    fn stdout(&self) -> UnboundedReceiver<String>;
    fn stderr(&self) -> UnboundedReceiver<String>;
    fn exit_code(&self) -> Option<i32>;
    fn wait<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn stdin(&self) -> UnboundedSender<String>

source

fn deploy_stdout(&self) -> Receiver<String>

Provides a oneshot channel to handshake with the binary, with the guarantee that as long as deploy is holding on to a handle, none of the messages will also be broadcast to the user-facing LaunchedBinary::stdout channel.

source

fn stdout(&self) -> UnboundedReceiver<String>

source

fn stderr(&self) -> UnboundedReceiver<String>

source

fn exit_code(&self) -> Option<i32>

source

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

Wait for the process to stop on its own. Returns the exit code.

source

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

If the process is still running, force stop it. Then run post-run tasks.

Implementors§