fn len_payload(&self) -> usize {
        use std::mem::size_of;
        match self {
            Value::Byte(_) => 1,
            Value::Short(_) => 2,
            Value::Int(_) => 4,
            Value::Long(_) => 8,
            Value::Float(_) => 4,
            Value::Double(_) => 8,
            Value::String(s) => 2 /* string size */ + s.len(),
            Value::List(v) => {
                1 /* item tag */ + 4 /* arr size */ + v.iter().map(Self::len_payload).sum::<usize>()
            }
            Value::Compound(hm) => {
                hm.iter().map(Self::size_of_compound_entry).sum::<usize>() + 1usize
            }
            Value::ByteArray(ba) => 4 /* arr size */ + size_of::<i8>()*ba.len(),
            Value::IntArray(ia) => 4 /* arr size */ + size_of::<i32>()*ia.len(),
            Value::LongArray(la) => 4 /* arr size */ + size_of::<i64>()*la.len(),
        }
    }
// The serialized size of the payload specifically, without tag IDs or names prepended.
The serialized size of the payload specifically, without tag IDs or names prepended.
The serialized size of the payload specifically without tag IDs or names prepended .
fn len_payload(&self) -> usize {
        use std::mem::size_of;
        match self {
            Value::Byte(_) => 1,
            Value::Short(_) => 2,
            Value::Int(_) => 4,
            Value::Long(_) => 8,
            Value::Float(_) => 4,
            Value::Double(_) => 8,
            Value::String(s) => 2 /* string size */ + s.len(),
            Value::List(v) => {
                1 /* item tag */ + 4 /* arr size */ + v.iter().map(Self::len_payload).sum::<usize>()
            }
            Value::Compound(hm) => {
                hm.iter().map(Self::size_of_compound_entry).sum::<usize>() + 1usize
            }
            Value::ByteArray(ba) => 4 /* arr size */ + size_of::<i8>()*ba.len(),
            Value::IntArray(ia) => 4 /* arr size */ + size_of::<i32>()*ia.len(),
            Value::LongArray(la) => 4 /* arr size */ + size_of::<i64>()*la.len(),
        }
    }
fn len_payload ( & self ) -> usize { use std :: mem :: size_of ; match self { Value :: Byte ( _ ) => 1 , Value :: Short ( _ ) => 2 , Value :: Int ( _ ) => 4 , Value :: Long ( _ ) => 8 , Value :: Float ( _ ) => 4 , Value :: Double ( _ ) => 8 , Value :: String ( s ) => 2 /* string size */ + s . len ( ) , Value :: List ( v ) => { 1 /* item tag */ + 4 /* arr size */ + v . iter ( ) . map ( Self :: len_payload ) . sum :: < usize > ( ) } Value :: Compound ( hm ) => { hm . iter ( ) . map ( Self :: size_of_compound_entry ) . sum :: < usize > ( ) + 1usize } Value :: ByteArray ( ba ) => 4 /* arr size */ + size_of :: < i8 > ( ) * ba . len ( ) , Value :: IntArray ( ia ) => 4 /* arr size */ + size_of :: < i32 > ( ) * ia . len ( ) , Value :: LongArray ( la ) => 4 /* arr size */ + size_of :: < i64 > ( ) * la . len ( ) , } }
The serialized size of the payload specifically, without tag IDs or names prepended.
The serialized size of the payload specifically without tag IDs or names prepended .
&self