Trait exers::runtimes::CodeRuntime
source · 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§
Required Methods§
sourcefn run(
&self,
code: &CompiledCode<Self>,
config: Self::Config
) -> Result<ExecutionResult, Self::Error>
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§
source§impl CodeRuntime for JailedRuntime
impl CodeRuntime for JailedRuntime
Runtime for jailed code.
source§impl CodeRuntime for NativeRuntime
impl CodeRuntime for NativeRuntime
Runtime for native code.
source§impl CodeRuntime for WasmRuntime
impl CodeRuntime for WasmRuntime
Runtime for wasm code.