Trait term_transcript::traits::ShellProcess

source ·
pub trait ShellProcess {
    // Required methods
    fn check_is_alive(&mut self) -> Result<()>;
    fn terminate(self) -> Result<()>;

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

Representation of a shell process.

Required Methods§

source

fn check_is_alive(&mut self) -> Result<()>

Checks if the process is alive.

§Errors

Returns an error if the process is not alive. Should include debug details if possible (e.g., the exit status of the process).

source

fn terminate(self) -> Result<()>

Terminates the shell process. This can include killing it if necessary.

§Errors

Returns an error if the process cannot be killed.

Provided Methods§

source

fn is_echoing(&self) -> bool

Returns true if the input commands are echoed back to the output.

The default implementation returns false.

Implementations on Foreign Types§

source§

impl ShellProcess for Child

Implementors§