1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! RAII lease returned by [`MemoryBudget::lease`](crate::MemoryBudget::lease).
use Arc;
use crateBudgetState;
/// Active short-term reservation against the budget.
///
/// While alive, the effective per-cache target is reduced by
/// `bytes()`. The reduction is released when the guard is dropped.
///
/// Issued by [`MemoryBudget::lease`](crate::MemoryBudget::lease).
/// The guard owns the shared accounting state until release, even when the
/// public budget handle has been dropped. It never releases a reservation
/// merely because work moved to another task or queue.