Trait goldenscript::Runner
source · 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>> { ... }
}
Expand description
Runs goldenscript commands, returning their output.
Required Methods§
Provided Methods§
sourcefn start_script(&mut self) -> Result<(), Box<dyn Error>>
fn start_script(&mut self) -> Result<(), Box<dyn Error>>
Called at the start of a goldenscript. Used e.g. for initial setup. Can’t return output, since it’s not called in the context of a block.
sourcefn end_script(&mut self) -> Result<(), Box<dyn Error>>
fn end_script(&mut self) -> Result<(), Box<dyn Error>>
Called at the end of a goldenscript. Used e.g. for state assertions. Can’t return output, since it’s not called in the context of a block.