Skip to main content

UNBOUNDED_MEASURING_PAD

Constant UNBOUNDED_MEASURING_PAD 

Source
const UNBOUNDED_MEASURING_PAD: usize = _; // 9_223_372_036_854_775_807usize
Expand description

Padding width that puts every wire length a varint can express within measuring reach.

Half of usize::MAX, so adding the buffered bytes cannot overflow PaddedBuf::remaining; a varint tops out at 2^62 - 1, well inside it on a 64-bit target.