decode_list_of_variable_length_items

Function decode_list_of_variable_length_items 

Source
pub fn decode_list_of_variable_length_items<T: Decode>(
    bytes: &[u8],
    max_len: Option<usize>,
) -> Result<Vec<T>, DecodeError>
Expand description

Decodes bytes as if it were a list of variable-length items.

The ssz::SszDecoder can also perform this functionality, however it it significantly faster as it is optimized to read same-typed items whilst ssz::SszDecoder supports reading items of differing types.