pub struct PoolArrayQueue<T> { /* private fields */ }Implementations§
Source§impl<T> PoolArrayQueue<T>where
T: Clear,
impl<T> PoolArrayQueue<T>where
T: Clear,
pub fn new(capacity: usize) -> Self
Sourcepub fn create(self: &Arc<Self>) -> PoolObjectContainer<T>
pub fn create(self: &Arc<Self>) -> PoolObjectContainer<T>
Create an object (default).
Sourcepub fn create_with<F: FnOnce() -> T>(
self: &Arc<Self>,
f: F,
) -> PoolObjectContainer<T>
pub fn create_with<F: FnOnce() -> T>( self: &Arc<Self>, f: F, ) -> PoolObjectContainer<T>
Create an object. The FnOnce that you pass as an argument does not affect the object if it is already present in the pool. It is interesting for example when creating a “vector” to specify a capacity.
pub fn len(&self) -> usize
Trait Implementations§
Source§impl<T: Debug> Debug for PoolArrayQueue<T>
impl<T: Debug> Debug for PoolArrayQueue<T>
Auto Trait Implementations§
impl<T> !Freeze for PoolArrayQueue<T>
impl<T> RefUnwindSafe for PoolArrayQueue<T>where
ArrayQueue<T>: RefUnwindSafe,
impl<T> Send for PoolArrayQueue<T>where
ArrayQueue<T>: Send,
impl<T> Sync for PoolArrayQueue<T>where
ArrayQueue<T>: Sync,
impl<T> Unpin for PoolArrayQueue<T>where
ArrayQueue<T>: Unpin,
impl<T> UnsafeUnpin for PoolArrayQueue<T>where
ArrayQueue<T>: UnsafeUnpin,
impl<T> UnwindSafe for PoolArrayQueue<T>where
ArrayQueue<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