BufPool

Trait BufPool 

Source
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§

Source

fn take(&self) -> BytesMut

Source

fn give(&self, b: BytesMut)

Provided Methods§

Source

fn chunk_size(&self) -> usize

Preferred buffer size; Builder::flush reserves this much when a buffer runs low.

Implementors§

Source§

impl BufPool for SimplePool

Available on crate feature std only.