pub trait CodeRuntime: Send + Sync + Sized {
    type Config: Send + Sync + Sized + Debug + Clone + Default;
    type AdditionalData: Send + Sync + Sized + Debug + Clone + Default;
    type Error: Send + Sync + Sized + 'static;

    // Required method
    fn run(
        &self,
        code: &CompiledCode<Self>,
        config: Self::Config
    ) -> Result<ExecutionResult, Self::Error>;
}
Expand description

Trait for every code runtime. Represents a runtime that can be used to run some code.

Required Associated Types§

source

type Config: Send + Sync + Sized + Debug + Clone + Default

Configuration for the runtime.

source

type AdditionalData: Send + Sync + Sized + Debug + Clone + Default

Additional compilation data. This is used to pass additional data from the compiler to the runtime.

source

type Error: Send + Sync + Sized + 'static

Error type for the runtime.

Required Methods§

source

fn run( &self, code: &CompiledCode<Self>, config: Self::Config ) -> Result<ExecutionResult, Self::Error>

Run compiled code. Returns saved output (if any) and exit code.

Implementors§