pub struct Limits {
pub max_steps: u64,
pub max_recursion_depth: u32,
pub max_output_bytes: usize,
pub max_output_lines: usize,
pub timeout: Duration,
pub max_capability_calls: u32,
pub max_value_bytes: u64,
pub allow_clock: bool,
}Expand description
Configurable execution bounds.
Fields§
§max_steps: u64Statements, loop iterations, and function calls one script may execute.
max_recursion_depth: u32Maximum nested shell-function calls.
max_output_bytes: usizeMaximum accumulated output bytes.
max_output_lines: usizeMaximum accumulated output lines.
timeout: DurationWall-clock deadline for the whole script.
max_capability_calls: u32Maximum capability invocations one script may drive.
max_value_bytes: u64Maximum value bytes one script may materialize; see Budget::charge_value_bytes.
allow_clock: boolWhether the date builtin may read the host wall clock.
This is the odd one out in this struct: it is a permission rather than a ceiling. It lives
here anyway because it travels the same path every other bound does, from one CLI flag
through one construction site, and a second parallel channel for a single boolean would be
one more place for the two to disagree. Off by default: reading the clock is ambient
authority, and with it off date is simply not a command this session has.
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.