pub fn to_slice<'a, 'b, T>(
    value: &'b T,
    buf: &'a mut [u32]
) -> Result<&'a [u32], Error> where
    T: Serialize + ?Sized