pub struct ProcessSandbox { /* private fields */ }Expand description
Process-based sandbox for development.
Executes code directly in a subprocess. Provides NO security isolation.
Implementations§
Source§impl ProcessSandbox
impl ProcessSandbox
Sourcepub const fn with_timeout(self, timeout_ms: u64) -> Self
pub const fn with_timeout(self, timeout_ms: u64) -> Self
Set execution timeout.
Sourcepub fn with_shell(self, shell: impl Into<String>) -> Self
pub fn with_shell(self, shell: impl Into<String>) -> Self
Set shell to use.
Trait Implementations§
Source§impl Clone for ProcessSandbox
impl Clone for ProcessSandbox
Source§fn clone(&self) -> ProcessSandbox
fn clone(&self) -> ProcessSandbox
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 Default for ProcessSandbox
impl Default for ProcessSandbox
Source§impl Sandbox for ProcessSandbox
impl Sandbox for ProcessSandbox
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute code in the sandbox. Read more
Auto Trait Implementations§
impl Freeze for ProcessSandbox
impl RefUnwindSafe for ProcessSandbox
impl Send for ProcessSandbox
impl Sync for ProcessSandbox
impl Unpin for ProcessSandbox
impl UnsafeUnpin for ProcessSandbox
impl UnwindSafe for ProcessSandbox
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