pub trait EvalKernel:
Send
+ Sync
+ Debug {
// Required methods
fn language(&self) -> EvalLanguage;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<EvalOutput, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Persistent eval kernel contract (“Eval kernel” extension).
Required behavior: persistent Python/Bun state across calls, bounded execution, explicit reset (design table row 4).
Required Methods§
Sourcefn language(&self) -> EvalLanguage
fn language(&self) -> EvalLanguage
Language this kernel evaluates.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".