Struct WorkBudgetDiagnostics
pub struct WorkBudgetDiagnostics {
pub limit: u64,
pub remaining: u64,
pub consumed: u64,
pub denied_requests: u64,
pub denied_units: u64,
pub cost_overflows: u64,
pub saturated: bool,
}Expand description
Snapshot of the current budget period, including legacy consumption methods.
limit, remaining and consumed are exact. Denial counters saturate at
u64::MAX and set saturated if any count exceeds that value. Diagnostics
never affect whether a request can be granted.
Fields§
§limit: u64Maximum allowance for this period.
remaining: u64Units available to subsequent requests.
consumed: u64Net units charged, including reservations and excluding refunds.
Equals WorkBudget::spent, not a cumulative total across refunds.
denied_requests: u64Requests denied in whole or part, including cost overflows.
denied_units: u64Ungranted units: the entire cost of an atomic denial, or the ungranted
portion of a partial grant. Unrepresentable costs are excluded and
counted separately in cost_overflows.
cost_overflows: u64Reservation requests rejected because their total cost exceeded u64::MAX.
saturated: boolAt least one denial counter exceeded u64::MAX during this period.
Trait Implementations§
§impl Clone for WorkBudgetDiagnostics
impl Clone for WorkBudgetDiagnostics
§fn clone(&self) -> WorkBudgetDiagnostics
fn clone(&self) -> WorkBudgetDiagnostics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more