(&self, pool: &dyn MemoryPool)
| 115 | /// Register this [`Bytes`] with the provided [`MemoryPool`], replacing any prior reservation. |
| 116 | #[cfg(feature = "pool")] |
| 117 | pub fn claim(&self, pool: &dyn MemoryPool) { |
| 118 | *self.reservation.lock().unwrap() = Some(pool.reserve(self.capacity())); |
| 119 | } |
| 120 | |
| 121 | /// Resize the memory reservation of this buffer |
| 122 | /// |