Skip to main content

TokenRefund

Type Alias TokenRefund 

Source
pub type TokenRefund = Box<dyn FnOnce(u64) + Send + Sync>;
Expand description

Refund channel invoked when a TokenReservation is dropped without being passed to TokenBudget::record_usage.

Implementations call this once with the reservation’s estimate to return the optimistic deduction to the underlying pool.

Aliased Type§

pub struct TokenRefund(/* private fields */);