pub struct SandboxSection {
pub enabled: bool,
pub deterministic: bool,
pub seed: Option<u64>,
pub memory_limit: Option<String>,
pub time_limit: Option<String>,
pub virtual_fs: bool,
pub seed_files: HashMap<String, String>,
}Expand description
[sandbox] section — isolation settings for deterministic/testing modes.
Fields§
§enabled: boolWhether sandbox mode is enabled.
deterministic: boolUse a deterministic runtime (fixed time, seeded RNG).
seed: Option<u64>RNG seed for deterministic mode.
memory_limit: Option<String>Memory limit (human-readable, e.g. “64MB”).
time_limit: Option<String>Execution time limit (human-readable, e.g. “10s”).
virtual_fs: boolUse a virtual filesystem instead of real I/O.
seed_files: HashMap<String, String>Seed files for the virtual filesystem: vfs_path -> real_path.
Implementations§
Source§impl SandboxSection
impl SandboxSection
Sourcepub fn memory_limit_bytes(&self) -> Option<u64>
pub fn memory_limit_bytes(&self) -> Option<u64>
Parse the memory_limit string (e.g. “64MB”) into bytes.
Sourcepub fn time_limit_ms(&self) -> Option<u64>
pub fn time_limit_ms(&self) -> Option<u64>
Parse the time_limit string (e.g. “10s”) into milliseconds.
Trait Implementations§
Source§impl Clone for SandboxSection
impl Clone for SandboxSection
Source§fn clone(&self) -> SandboxSection
fn clone(&self) -> SandboxSection
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 Debug for SandboxSection
impl Debug for SandboxSection
Source§impl Default for SandboxSection
impl Default for SandboxSection
Source§fn default() -> SandboxSection
fn default() -> SandboxSection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SandboxSection
impl<'de> Deserialize<'de> for SandboxSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SandboxSection
impl PartialEq for SandboxSection
Source§impl Serialize for SandboxSection
impl Serialize for SandboxSection
impl StructuralPartialEq for SandboxSection
Auto Trait Implementations§
impl Freeze for SandboxSection
impl RefUnwindSafe for SandboxSection
impl Send for SandboxSection
impl Sync for SandboxSection
impl Unpin for SandboxSection
impl UnsafeUnpin for SandboxSection
impl UnwindSafe for SandboxSection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more