MCPcopy Create free account
hub / github.com/ElementsProject/lightning / serialize

Method serialize

plugins/lsps-plugin/src/core/tlv.rs:206–210  ·  view source on GitHub ↗
(&self, serializer: S)

Source from the content-addressed store, hash-verified

204
205impl Serialize for TlvStream {
206 fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> {
207 let mut tmp = self.clone();
208 let bytes = tmp.to_bytes().map_err(serde::ser::Error::custom)?;
209 serializer.serialize_str(&hex::encode(bytes))
210 }
211}
212
213impl<'de> Deserialize<'de> for TlvStream {

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.50
to_bytesMethod · 0.45

Tested by

no test coverage detected