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 authored and GitHub committed 2021-11-07 23:29:51 +00:00
1 parent 937b6f246e
commit 63d2ff0c36
3 files changed
+4

No files matched your search

@@ -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 {