pub trait MemoryEstimator: Send + Sync {
// Required methods
fn estimate_bytes(&self, items_buffered: usize) -> usize;
fn name(&self) -> &'static str;
}Expand description
Trait for estimating memory usage of buffered items
This allows customization of memory estimation if workload characteristics differ from the default conservative 2KB per item assumption.
Required Methods§
Sourcefn estimate_bytes(&self, items_buffered: usize) -> usize
fn estimate_bytes(&self, items_buffered: usize) -> usize
Estimate total memory in bytes for given number of buffered items