pub struct ObjectPool<T> {
objects: Vec<T>,
enabled: bool,
}Expand description
Memory pool for frequently allocated objects
Fields§
§objects: Vec<T>§enabled: boolImplementations§
Source§impl<T> ObjectPool<T>
impl<T> ObjectPool<T>
Trait Implementations§
Source§impl<T: Debug> Debug for ObjectPool<T>
impl<T: Debug> Debug for ObjectPool<T>
Auto Trait Implementations§
impl<T> Freeze for ObjectPool<T>
impl<T> RefUnwindSafe for ObjectPool<T>where
T: RefUnwindSafe,
impl<T> Send for ObjectPool<T>where
T: Send,
impl<T> Sync for ObjectPool<T>where
T: Sync,
impl<T> Unpin for ObjectPool<T>where
T: Unpin,
impl<T> UnwindSafe for ObjectPool<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more