pub struct SandboxConfig {
pub sandbox_type: SandboxType,
pub timeout_ms: u64,
pub memory_limit: Option<u64>,
pub cpu_limit: Option<f32>,
}Expand description
Sandbox configuration.
Fields§
§sandbox_type: SandboxType§timeout_ms: u64§memory_limit: Option<u64>§cpu_limit: Option<f32>Implementations§
Source§impl SandboxConfig
impl SandboxConfig
Sourcepub fn timeout_ms(self, ms: u64) -> Self
pub fn timeout_ms(self, ms: u64) -> Self
Set timeout.
Sourcepub fn memory_limit(self, bytes: u64) -> Self
pub fn memory_limit(self, bytes: u64) -> Self
Set memory limit.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
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 moreAuto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfig
impl UnwindSafe for SandboxConfig
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