Struct fxbox_thinkerbell::run::Execution
[−]
[src]
pub struct Execution<Env> where Env: ExecutableDevEnv + 'static {
// some fields omitted
}
Running and controlling a single script.
Methods
impl<Env> Execution<Env> where Env: ExecutableDevEnv + 'static
fn new() -> Self
fn start<F>(&mut self, api: Env::API, script: Script<UncheckedCtx>, on_event: F) where F: Fn(ExecutionEvent) + Send + 'static
Start executing the script.
Errors
Produces RunningError:AlreadyRunning if the script is already running.
fn stop<F>(&mut self, on_result: F) where F: Fn(Result<(), Error>) + Send + 'static
Stop executing the script, asynchronously.
Errors
Produces RunningError:NotRunning if the script is not running yet.