pub struct Pool {
pub inner: Pool<BufferMetadata>,
pub buffer_size: usize,
}
Fields§
§inner: Pool<BufferMetadata>
§buffer_size: usize
Implementations§
Methods from Deref<Target = Pool<BufferMetadata>>§
pub fn grow_to(&mut self, count: usize)
Sourcepub fn checkout<F>(&mut self, init: F) -> Option<Checkout<T>>where
F: Fn() -> T,
pub fn checkout<F>(&mut self, init: F) -> Option<Checkout<T>>where
F: Fn() -> T,
Checkout a value from the pool. Returns None
if the pool is currently
at capacity.
The value returned from the pool has not been reset and contains the state that it previously had when it was last released.
pub fn capacity(&self) -> usize
pub fn maximum_capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn memory_size(&self) -> usize
pub fn used(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pool
impl !RefUnwindSafe for Pool
impl Send for Pool
impl !Sync for Pool
impl Unpin for Pool
impl !UnwindSafe for Pool
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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