Skip to main content

ScratchPool

Trait ScratchPool 

Source
pub trait ScratchPool: Send {
    // Required methods
    fn bytes_allocated(&self) -> usize;
    fn reset(&mut self);
}
Expand description

Caller-owned reusable scratch allocations for codec implementations.

Required Methods§

Source

fn bytes_allocated(&self) -> usize

Return the number of bytes currently retained by the pool.

Source

fn reset(&mut self)

Clear reusable allocations or cached state held by the pool.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§