pub struct RecyclePoolConfig {
pub initial_capacity: usize,
pub max_capacity: usize,
pub grow_by: usize,
pub shrink_threshold: f32,
pub min_capacity: usize,
}Expand description
Configuration for recycle pools.
Fields§
§initial_capacity: usizeInitial capacity
max_capacity: usizeMaximum capacity (0 = unlimited)
grow_by: usizeGrow by this amount when exhausted
shrink_threshold: f32Shrink when usage drops below this fraction
min_capacity: usizeMinimum capacity to maintain
Implementations§
Source§impl RecyclePoolConfig
impl RecyclePoolConfig
Sourcepub fn initial_capacity(self, capacity: usize) -> Self
pub fn initial_capacity(self, capacity: usize) -> Self
Set initial capacity.
Sourcepub fn max_capacity(self, max: usize) -> Self
pub fn max_capacity(self, max: usize) -> Self
Set maximum capacity.
Sourcepub fn shrink_threshold(self, threshold: f32) -> Self
pub fn shrink_threshold(self, threshold: f32) -> Self
Set shrink threshold.
Sourcepub fn min_capacity(self, min: usize) -> Self
pub fn min_capacity(self, min: usize) -> Self
Set minimum capacity.
Trait Implementations§
Source§impl Clone for RecyclePoolConfig
impl Clone for RecyclePoolConfig
Source§fn clone(&self) -> RecyclePoolConfig
fn clone(&self) -> RecyclePoolConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecyclePoolConfig
impl Debug for RecyclePoolConfig
Auto Trait Implementations§
impl Freeze for RecyclePoolConfig
impl RefUnwindSafe for RecyclePoolConfig
impl Send for RecyclePoolConfig
impl Sync for RecyclePoolConfig
impl Unpin for RecyclePoolConfig
impl UnwindSafe for RecyclePoolConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging