Takes an object from the pool or creates a new one.
(&self, clear: impl FnOnce(&mut T), new: impl FnOnce() -> T)
| 99 | |
| 100 | /// Takes an object from the pool or creates a new one. |
| 101 | pub fn take(&self, clear: impl FnOnce(&mut T), new: impl FnOnce() -> T) -> T { |
| 102 | self.inner.take(clear, new) |
| 103 | } |
| 104 | |
| 105 | /// Returns the number of pages dropped by the pool because the pool was at capacity. |
| 106 | pub fn dropped_count(&self) -> usize { |