Skip to main content

VecPool

Type Alias VecPool 

Source
pub type VecPool<T> = ObjectPool<Vec<T>>;
Expand description

A specialized pool for Vec<T> that clears vectors on return.

Aliased Type§

pub struct VecPool<T> { /* private fields */ }

Implementations§

Source§

impl<T: 'static> VecPool<T>

Source

pub fn new_vec_pool() -> Self

Creates a new vector pool.

Source

pub fn new_vec_pool_with_capacity(capacity: usize) -> Self

Creates a new vector pool with pre-allocated capacity.