pub fn serialize<T>(value: &T) -> Result<Intermediate>where
    T: Serialize + ?Sized,