pub struct SandboxResourceLimits {
pub cpus: f64,
pub memory_bytes: i64,
pub pids_limit: i64,
}Expand description
Resource limits applied to every sandbox container/VM.
Parsed once from .env (SANDBOX_*) at construction; any parse error falls
back to conservative defaults instead of panicking — the sandbox must build
on hosts where these vars are unset. The Docker/Kata backends push these
straight into a bollard HostConfig; the Cube backend best-effort maps them
to cube CLI flags.
Fields§
§cpus: f64Logical CPUs (e.g. 1.0, 0.5).
memory_bytes: i64Memory cap in bytes (human-readable units are parsed by [parse_size]).
pids_limit: i64Maximum number of processes (pids cgroup).
Implementations§
Trait Implementations§
Source§impl Clone for SandboxResourceLimits
impl Clone for SandboxResourceLimits
Source§fn clone(&self) -> SandboxResourceLimits
fn clone(&self) -> SandboxResourceLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SandboxResourceLimits
Auto Trait Implementations§
impl Freeze for SandboxResourceLimits
impl RefUnwindSafe for SandboxResourceLimits
impl Send for SandboxResourceLimits
impl Sync for SandboxResourceLimits
impl Unpin for SandboxResourceLimits
impl UnsafeUnpin for SandboxResourceLimits
impl UnwindSafe for SandboxResourceLimits
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