Trait process_stream::ProcessExt
source · [−]pub trait ProcessExt {
fn get_command(&mut self) -> &mut Command;
fn killer(&self) -> Option<Sender<()>>;
fn set_killer(&mut self, killer: Sender<()>);
fn command(&mut self) -> &mut Command { ... }
fn spawn_and_stream(
&mut self
) -> Result<Pin<Box<dyn Stream<Item = ProcessItem> + Send>>> { ... }
fn take_stdin(&mut self) -> Option<ChildStdin> { ... }
fn set_child_stdin(&mut self, _child_stdin: Option<ChildStdin>) { ... }
fn get_stdin(&mut self) -> Option<Stdio> { ... }
fn get_stdout(&mut self) -> Option<Stdio> { ... }
fn get_stderr(&mut self) -> Option<Stdio> { ... }
fn kill<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
}
Expand description
ProcessExt trait that needs to be implemented to make something streamable
Required Methods
fn get_command(&mut self) -> &mut Command
fn get_command(&mut self) -> &mut Command
Get command that will be used to create a child process from
Get a sender that can be used to send kill a the process
fn set_killer(&mut self, killer: Sender<()>)
fn set_killer(&mut self, killer: Sender<()>)
Set a sender that can be used to send kill a the process
Provided Methods
fn spawn_and_stream(
&mut self
) -> Result<Pin<Box<dyn Stream<Item = ProcessItem> + Send>>>
fn spawn_and_stream(
&mut self
) -> Result<Pin<Box<dyn Stream<Item = ProcessItem> + Send>>>
Spawn and stream process
fn take_stdin(&mut self) -> Option<ChildStdin>
fn take_stdin(&mut self) -> Option<ChildStdin>
Get process stdin
fn set_child_stdin(&mut self, _child_stdin: Option<ChildStdin>)
fn set_child_stdin(&mut self, _child_stdin: Option<ChildStdin>)
Set process stdin
fn get_stdout(&mut self) -> Option<Stdio>
fn get_stdout(&mut self) -> Option<Stdio>
get process stdout pipe
fn get_stderr(&mut self) -> Option<Stdio>
fn get_stderr(&mut self) -> Option<Stdio>
get process stderr pipe