Document that serde impl of LeafVersion uses u8 in consensus encoding

Closes #764
This commit is contained in:
Dr Maxim Orlovsky 2022-01-13 17:53:50 +01:00
parent 73e6ce4e53
commit 62a27a51e2
1 changed files with 2 additions and 0 deletions

View File

@ -869,6 +869,7 @@ impl fmt::UpperHex for LeafVersion {
} }
} }
/// Serializes LeafVersion as u8 using consensus encoding
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
impl ::serde::Serialize for LeafVersion { impl ::serde::Serialize for LeafVersion {
@ -880,6 +881,7 @@ impl ::serde::Serialize for LeafVersion {
} }
} }
/// Deserializes LeafVersion as u8 using consensus encoding
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
impl<'de> ::serde::Deserialize<'de> for LeafVersion { impl<'de> ::serde::Deserialize<'de> for LeafVersion {