pub fn serialize<S>( certs: &BTreeMap<PeerId, Certificate>, serializer: S, ) -> Result<S::Ok, S::Error>where S: Serializer,