pub struct GlobalBufferPools { /* private fields */ }Expand description
Global buffer pools for different use cases
Implementations§
Source§impl GlobalBufferPools
impl GlobalBufferPools
pub fn new() -> Self
Sourcepub fn get_buffer(&self, expected_size: usize) -> PooledBuffer
pub fn get_buffer(&self, expected_size: usize) -> PooledBuffer
Get appropriate buffer based on expected size with better size selection
Sourcepub fn get_small(&self) -> PooledBuffer
pub fn get_small(&self) -> PooledBuffer
Get small buffer (for headers, small data)
Sourcepub fn get_medium(&self) -> PooledBuffer
pub fn get_medium(&self) -> PooledBuffer
Get medium buffer (for typical HTTP data)
Sourcepub fn get_large(&self) -> PooledBuffer
pub fn get_large(&self) -> PooledBuffer
Get large buffer (for big payloads)
Sourcepub fn get_extra_large(&self) -> PooledBuffer
pub fn get_extra_large(&self) -> PooledBuffer
Get extra large buffer (for very large PUT/POST requests)
Sourcepub fn stats(&self) -> BufferPoolStats
pub fn stats(&self) -> BufferPoolStats
Get pool statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlobalBufferPools
impl !RefUnwindSafe for GlobalBufferPools
impl Send for GlobalBufferPools
impl Sync for GlobalBufferPools
impl Unpin for GlobalBufferPools
impl !UnwindSafe for GlobalBufferPools
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