pub fn serialize<T: Serialize, S: Serializer>(
    x: &T,
    s: S
) -> Result<S::Ok, S::Error>