pub trait Runner {
// Required method
fn run(&mut self, command: &Command) -> Result<String, Box<dyn Error>>;
// Provided methods
fn start_script(&mut self) -> Result<(), Box<dyn Error>> { ... }
fn end_script(&mut self) -> Result<(), Box<dyn Error>> { ... }
fn start_block(&mut self) -> Result<String, Box<dyn Error>> { ... }
fn end_block(&mut self) -> Result<String, Box<dyn Error>> { ... }
fn start_command(
&mut self,
command: &Command,
) -> Result<String, Box<dyn Error>> { ... }
fn end_command(
&mut self,
command: &Command,
) -> Result<String, Box<dyn Error>> { ... }
}Required Methods§
Provided Methods§
fn start_script(&mut self) -> Result<(), Box<dyn Error>>
fn end_script(&mut self) -> Result<(), Box<dyn Error>>
fn start_block(&mut self) -> Result<String, Box<dyn Error>>
fn end_block(&mut self) -> Result<String, Box<dyn Error>>
fn start_command(&mut self, command: &Command) -> Result<String, Box<dyn Error>>
fn end_command(&mut self, command: &Command) -> Result<String, Box<dyn Error>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".