Returns a clone of this [`MemoryConsumer`] with a new unique id, which can be registered with a [`MemoryPool`], This new consumer is separate from the original.
(&self)
| 307 | /// which can be registered with a [`MemoryPool`], |
| 308 | /// This new consumer is separate from the original. |
| 309 | pub fn clone_with_new_id(&self) -> Self { |
| 310 | Self { |
| 311 | name: self.name.clone(), |
| 312 | can_spill: self.can_spill, |
| 313 | id: Self::new_unique_id(), |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /// Return the unique id of this [`MemoryConsumer`] |
| 318 | pub fn id(&self) -> usize { |