Skip to main content

size_hint

Function size_hint 

Source
fn size_hint<'a, K, V, I>(items: I) -> usize
where I: Iterator<Item = (&'a K, &'a V)>, K: AsRef<[u8]> + 'a, V: AsRef<[u8]> + 'a,
Expand description

Estimates write-batch capacity for a reusable sequence of raw pairs.

The estimate includes the fixed header, worst-case per-operation metadata, and payload lengths. Saturating arithmetic prevents an oversized input from wrapping the reservation.