Trait Runnable

Source
pub trait Runnable:
    Send
    + Sync
    + 'static {
    // Required methods
    fn step(&mut self, gc: &mut GC<OnionObjectCell>) -> StepResult;
    fn copy(&self) -> Box<dyn Runnable>;
    fn format_context(&self) -> Result<Value, RuntimeError>;

    // Provided methods
    fn receive(
        &mut self,
        step_result: &StepResult,
        gc: &mut GC<OnionObjectCell>,
    ) -> Result<(), RuntimeError> { ... }
    fn copy_with_gc(&self, gc: &mut GC<OnionObjectCell>) -> Box<dyn Runnable> { ... }
}

Required Methods§

Source

fn step(&mut self, gc: &mut GC<OnionObjectCell>) -> StepResult

Source

fn copy(&self) -> Box<dyn Runnable>

Source

fn format_context(&self) -> Result<Value, RuntimeError>

Provided Methods§

Source

fn receive( &mut self, step_result: &StepResult, gc: &mut GC<OnionObjectCell>, ) -> Result<(), RuntimeError>

Source

fn copy_with_gc(&self, gc: &mut GC<OnionObjectCell>) -> Box<dyn Runnable>

Implementors§