Skip to main content

put_nullable_array_len

Function put_nullable_array_len 

Source
pub fn put_nullable_array_len<B: BufMut>(
    buf: &mut B,
    len: Option<usize>,
    flexible: bool,
)
Expand description

Writes a nullable array-length prefix. None encodes as −1 for non-flexible versions, or 0 for flexible versions.

§Panics

Panics if a value previously validated by the protocol type no longer satisfies its encoded-length or field-range invariant.