pub trait CodeExecutor {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
code: &'life1 str,
connectors: &'life2 [ConnectorDescription],
execution_id: &'life3 str,
host: Arc<ExecutionHost>,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, String>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Executes model-generated JavaScript for one replay pass.
Executors provide isolation and host bridging. The durable lifecycle,
connector policy, approvals, replay, and rollback remain in crate::CodeMode.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
code: &'life1 str,
connectors: &'life2 [ConnectorDescription],
execution_id: &'life3 str,
host: Arc<ExecutionHost>,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
code: &'life1 str,
connectors: &'life2 [ConnectorDescription],
execution_id: &'life3 str,
host: Arc<ExecutionHost>,
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult, String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Executes one pass and returns its result or captured program error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".