Skip to main content

assess_limits

Function assess_limits 

Source
pub fn assess_limits(
    current: Usage,
    requested_units: u64,
    unit_price_micros: u64,
    limits: Limits,
) -> LimitDecision
Expand description

Atomically assess a proposed usage increment against quota and spend caps.

unit_price_micros is the monetary price of one metered unit. Exact boundary values are allowed: a limit rejects only when the new total is greater.