We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Readable
Offer
1 parent bd16a1e commit c13b6d8Copy full SHA for c13b6d8
lightning/src/offers/offer.rs
@@ -966,6 +966,13 @@ impl OfferContents {
966
}
967
968
969
+impl Readable for Offer {
970
+ fn read<R: io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
971
+ let bytes: WithoutLength<Vec<u8>> = Readable::read(reader)?;
972
+ Self::try_from(bytes.0).map_err(|_| DecodeError::InvalidValue)
973
+ }
974
+}
975
+
976
impl Writeable for Offer {
977
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), io::Error> {
978
WithoutLength(&self.bytes).write(writer)
0 commit comments