pub trait BufPool {
// Required methods
fn take(&self) -> BytesMut;
fn give(&self, b: BytesMut);
// Provided method
fn chunk_size(&self) -> usize { ... }
}Expand description
Source of reusable buffers. take returns an empty buffer; give returns it.
Required Methods§
Provided Methods§
Sourcefn chunk_size(&self) -> usize
fn chunk_size(&self) -> usize
Preferred buffer size; Builder::flush reserves this much when a
buffer runs low.
Implementors§
impl BufPool for SimplePool
Available on crate feature
std only.