MCPcopy Create free account
hub / github.com/apache/avro-rs / decode_len

Function decode_len

avro/src/decode.rs:47–50  ·  view source on GitHub ↗
(reader: &mut R)

Source from the content-addressed store, hash-verified

45#[inline]
46pub(crate) fn decode_len<R: Read>(reader: &mut R) -> AvroResult<usize> {
47 let len = zag_i64(reader)?;
48 safe_len(usize::try_from(len).map_err(|e| Details::ConvertI64ToUsize(e, len))?)
49}
50
51/// Decode the length of a sequence.
52///
53/// Maps and arrays are 0-terminated, 0i64 is also encoded as 0 in Avro reading a length of 0 means

Callers 3

deserialize_big_decimalFunction · 0.85
decode_internalFunction · 0.85
read_bytes_with_lenMethod · 0.85

Calls 2

zag_i64Function · 0.85
safe_lenFunction · 0.85

Tested by

no test coverage detected