pub fn to_slice<T>( value: &T, cmd: &str, buf: &mut [u8], options: SerializeOptions<'_> ) -> Result<usize>where T: Serialize + ?Sized,
Serializes the given data structure to a buffer