pub struct Budget {
pub max_nodes: u64,
pub max_depth: u64,
pub max_array_len: u64,
pub max_keys: u64,
pub max_wall_ms: u64,
pub max_value_size: u64,
pub max_total_value_size: u64,
}Expand description
Runtime resource limits enforced by the evaluator accountant
(spec/budgets.md §2, C-037). Every field 0 means unlimited —
the embedder accepts the risk explicitly.
Fields§
§max_nodes: u64Maximum IR nodes visited (arena-length pre-check).
max_depth: u64Maximum value nesting depth (reference-aware).
max_array_len: u64Longest single array.
max_keys: u64Total value-table keys across the arena (schema tables excluded: they are metadata, validated separately).
max_wall_ms: u64Wall-clock milliseconds for the whole evaluation.
max_value_size: u64Maximum materialized value size in data units (scalars and
string bytes), counting reference expansion: each Ref clone
costs its target’s bound. Kills exponential blowup
(billion-laughs class) before anything materializes.
max_total_value_size: u64Maximum cumulative materialized size across the whole evaluation (same units). Per-node bounds cap each clone; this caps their sum — many aliases of one large value trip here even when every node is individually fine.
Implementations§
Trait Implementations§
impl Copy for Budget
impl Eq for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Freeze for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
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.