Add serde support for Slot type (#10204)

Add serde support for the `Slot` type as we'd like to use it directly in our RPC.
This commit is contained in:
Liu-Cheng Xu
2021-11-08 07:29:51 +08:00
committed by GitHub
parent 937b6f246e
commit 63d2ff0c36
3 changed files with 4 additions and 0 deletions
@@ -24,6 +24,7 @@ use scale_info::TypeInfo;
/// Unit type wrapper that represents a slot.
#[derive(Debug, Encode, MaxEncodedLen, Decode, Eq, Clone, Copy, Default, Ord, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub struct Slot(u64);
impl core::ops::Deref for Slot {