pub fn write_len(w: &mut impl Write, len: usize) -> Result<()>
Writes a collection length as u32, returning an error if it exceeds u32::MAX.
u32::MAX