pub fn to_vec<'a, T>(value: &'a T) -> Result<Vec<u32>, Error> where
    T: Serialize + ?Sized