pub struct ContainerCodeExecutor { /* private fields */ }Expand description
Code executor that runs code in Docker containers.
Provides strong isolation by executing code in disposable Docker containers with configurable resource limits.
Implementations§
Source§impl ContainerCodeExecutor
impl ContainerCodeExecutor
Sourcepub fn with_config(config: ContainerCodeExecutorConfig) -> Self
pub fn with_config(config: ContainerCodeExecutorConfig) -> Self
Create with a custom configuration.
Trait Implementations§
Source§impl Clone for ContainerCodeExecutor
impl Clone for ContainerCodeExecutor
Source§fn clone(&self) -> ContainerCodeExecutor
fn clone(&self) -> ContainerCodeExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CodeExecutor for ContainerCodeExecutor
impl CodeExecutor for ContainerCodeExecutor
Source§fn execute_code<'life0, 'async_trait>(
&'life0 self,
input: CodeExecutionInput,
) -> Pin<Box<dyn Future<Output = Result<CodeExecutionResult, CodeExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_code<'life0, 'async_trait>(
&'life0 self,
input: CodeExecutionInput,
) -> Pin<Box<dyn Future<Output = Result<CodeExecutionResult, CodeExecutorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute code and return the result.
Source§fn code_block_delimiters(&self) -> Vec<(String, String)>
fn code_block_delimiters(&self) -> Vec<(String, String)>
Delimiters for identifying code blocks in model output.
Source§fn execution_result_delimiters(&self) -> (String, String)
fn execution_result_delimiters(&self) -> (String, String)
Delimiters for wrapping execution results.
Source§fn error_retry_attempts(&self) -> u32
fn error_retry_attempts(&self) -> u32
Number of retry attempts on error.
Source§impl Debug for ContainerCodeExecutor
impl Debug for ContainerCodeExecutor
Auto Trait Implementations§
impl Freeze for ContainerCodeExecutor
impl RefUnwindSafe for ContainerCodeExecutor
impl Send for ContainerCodeExecutor
impl Sync for ContainerCodeExecutor
impl Unpin for ContainerCodeExecutor
impl UnsafeUnpin for ContainerCodeExecutor
impl UnwindSafe for ContainerCodeExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more