Skip to main content

ScriptHost

Trait ScriptHost 

Source
pub trait ScriptHost {
    // Required methods
    async fn call(&mut self, cmd: &str, args: Value) -> Value;
    fn must_stop(&self) -> bool;
    fn cut_off(&mut self, cmd: &str);
}
Expand description

The phone side of a run.

Required Methods§

Source

async fn call(&mut self, cmd: &str, args: Value) -> Value

Run one call and give back the object the command would print.

Source

fn must_stop(&self) -> bool

True once the run must not go on.

Source

fn cut_off(&mut self, cmd: &str)

A call was cut off by the time limit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§