pub fn to_vec_with_size_hint<T, BO>( value: &T, capacity_hint: usize, ) -> Result<Vec<u8>>where T: Serialize, BO: ByteOrder,
Serialize to Vec<u8> Size hint indicates how many bytes to initially allocate for serialized data.
Vec<u8>