Skip to main content

max_items_size

Function max_items_size 

Source
pub fn max_items_size(len: usize, item_size: usize) -> usize
Expand description

Returns an upper bound on the encoded size of a Vec or other length-prefixed sequence of len items that each encode to at most item_size bytes, with the length prefix at its widest.

ยงPanics

Panics if len exceeds u32::MAX.