pub trait WhileRunning<TR> {
    fn while_running<'life0, 'async_trait>(
        &'life0 mut self,
        f: impl 'async_trait + Future<Output = TR> + Send,
        name: String
    ) -> Pin<Box<dyn Future<Output = Result<TR>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Expand description

Adds a method to run a dependent future in parallel to a given process.

Required Methods§

Run a future as long as this process is running. If the process terminates before the future completes, this method returns a Error::ProcessTerminated error.

Implementations on Foreign Types§

Implementors§