pub struct PoolConfig {
pub max_buffers_per_bucket: usize,
pub max_total_memory: usize,
pub buffer_ttl: Duration,
pub track_stats: bool,
pub simd_alignment: usize,
pub validator: SecurityValidator,
}Expand description
Configuration for buffer pool behavior
Fields§
§max_buffers_per_bucket: usizeMaximum number of buffers per size bucket
max_total_memory: usizeMaximum total memory usage in bytes
buffer_ttl: DurationHow long to keep unused buffers before cleanup
track_stats: boolEnable/disable pool statistics tracking
simd_alignment: usizeAlignment for SIMD operations (typically 32 or 64 bytes)
validator: SecurityValidatorSecurity validator for buffer validation
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub fn from_security_config(security_config: &SecurityConfig) -> Self
pub fn from_security_config(security_config: &SecurityConfig) -> Self
Create configuration from security config
Sourcepub fn simd_optimized() -> Self
pub fn simd_optimized() -> Self
Create configuration optimized for SIMD operations
Sourcepub fn low_memory() -> Self
pub fn low_memory() -> Self
Create configuration for low-memory environments
Sourcepub fn development() -> Self
pub fn development() -> Self
Create configuration for development/testing
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
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 PoolConfig
impl Debug for PoolConfig
Source§impl Default for PoolConfig
impl Default for PoolConfig
Source§impl From<&SecurityConfig> for PoolConfig
impl From<&SecurityConfig> for PoolConfig
Source§fn from(security_config: &SecurityConfig) -> Self
fn from(security_config: &SecurityConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnwindSafe for PoolConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more