Lines Matching refs:cell
32 use std::cell::Cell;
89 cell: &'a Cell<Budget>, in with_budget() field
95 self.cell.set(self.prev); in with_budget()
99 CURRENT.with(move |cell| { in with_budget()
100 let prev = cell.get(); in with_budget()
102 cell.set(budget); in with_budget()
104 let _guard = ResetGuard { cell, prev }; in with_budget()
113 CURRENT.with(|cell| cell.set(budget))
118 CURRENT.with(|cell| cell.get().has_remaining())
127 CURRENT.with(|cell| {
128 let prev = cell.get();
129 cell.set(Budget::unconstrained());
153 CURRENT.with(|cell| {
154 cell.set(budget);
174 CURRENT.with(|cell| {
175 let mut budget = cell.get();
178 let restore = RestoreOnPending(Cell::new(cell.get()));
179 cell.set(budget);
215 CURRENT.with(|cell| cell.get()) in get()