pub fn get_nullable_array_len<B: Buf>(
buf: &mut B,
flexible: bool,
) -> Result<Option<usize>, ProtocolError>Expand description
Reads a nullable array length. Returns None when the encoded value is
null, which is −1 for non-flexible versions and 0 for flexible versions.
§Errors
Returns the underlying protocol error when input is truncated, contains an invalid length or tag, or cannot be encoded for the selected version.
§Panics
Panics if a value previously validated by the protocol type no longer satisfies its encoded-length or field-range invariant.