pub struct Budget {
pub max_calls: u64,
pub max_bytes: u64,
pub max_wall_ms: u64,
pub max_nodes: u64,
pub max_depth: u64,
pub max_array_len: u64,
pub max_value_size: u64,
}Expand description
A capability’s or lane’s resource budget.
Fields§
§max_calls: u64Maximum calls through this capability (and its children in total).
max_bytes: u64Maximum payload bytes moved through this capability.
max_wall_ms: u64Maximum wall-clock milliseconds for one call.
max_nodes: u64Maximum Active IR nodes an evaluation may visit.
max_depth: u64Maximum value nesting depth.
max_array_len: u64Maximum array length.
max_value_size: u64Maximum materialised value size.
Implementations§
Source§impl Budget
impl Budget
Sourcepub fn calls(limit: u64) -> Self
pub fn calls(limit: u64) -> Self
A small budget with a fixed call allowance, for attenuation tests.
Sourcepub fn is_attenuation_of(&self, parent: &Budget) -> bool
pub fn is_attenuation_of(&self, parent: &Budget) -> bool
True when every ceiling of self is at most parent’s.
Sourcepub fn intersect(&self, other: &Budget) -> Budget
pub fn intersect(&self, other: &Budget) -> Budget
Pointwise minimum: the strongest attenuation of two budgets.
Sourcepub fn to_active_budget(&self) -> Budget
pub fn to_active_budget(&self) -> Budget
Map onto the Active evaluator’s budget. The evaluator gets the same ceilings, so a capability cannot be used to outspend its grant.
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
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<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
Compare self to
key and return true if they are equal.