pub struct Limits {
pub max_steps: u32,
pub max_tokens: u64,
pub deadline_ms: u64,
pub max_depth: u32,
pub memory_bytes: Option<u64>,
pub cpu_seconds: Option<u64>,
pub nice: Option<i32>,
}Fields§
§max_steps: u32§max_tokens: u64§deadline_ms: u64Wall-clock deadline in milliseconds from the child’s start. The child arms its own deadline AND the supervisor tracks an absolute one: the second copy is what still fires when the child is too wedged to honour the first.
max_depth: u32§memory_bytes: Option<u64>OS-level caps, applied between fork and exec (setrlimit) — real
resource allocation, not protocol accounting. None = inherit.
memory_bytes → RLIMIT_AS; cpu_seconds → RLIMIT_CPU (the kernel
sends SIGXCPU at the soft cap, SIGKILL at hard = soft + 5 s).
cpu_seconds: Option<u64>§nice: Option<i32>Niceness delta from priority: (low → +10, high → −5 best-effort —
raising needs privilege and is skipped silently without it).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Limits
impl<'de> Deserialize<'de> for Limits
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
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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