Skip to main content

debit_at

Function debit_at 

Source
fn debit_at(
    table: &Mutex<Table>,
    key: &str,
    limit: Limit,
    axis: Axis,
    now: Instant,
    cap: usize,
) -> Result<Hold>
Expand description

Take one token from an account’s bucket, refusing when none is left.

An account the table does not hold starts with a full bucket. When the table holds cap accounts and nothing can be pruned, the axis decides whether such an account is refused or let through untracked.