pub struct LocalSandbox { /* private fields */ }Expand description
Local process sandbox using tokio::process::Command.
Implementations§
Source§impl LocalSandbox
impl LocalSandbox
Sourcepub fn with_python_path(self, path: impl Into<String>) -> Self
pub fn with_python_path(self, path: impl Into<String>) -> Self
Use a custom Python interpreter path.
Sourcepub fn with_node_path(self, path: impl Into<String>) -> Self
pub fn with_node_path(self, path: impl Into<String>) -> Self
Use a custom Node.js runtime path.
Trait Implementations§
Source§impl CodeSandbox for LocalSandbox
impl CodeSandbox for LocalSandbox
Source§fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 str,
language: Language,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<RunResult, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 str,
language: Language,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<RunResult, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the given code in the specified language.
Auto Trait Implementations§
impl Freeze for LocalSandbox
impl RefUnwindSafe for LocalSandbox
impl Send for LocalSandbox
impl Sync for LocalSandbox
impl Unpin for LocalSandbox
impl UnsafeUnpin for LocalSandbox
impl UnwindSafe for LocalSandbox
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