From cf1aae8521fd7f4b32bd1128f8fc90f7f277fae2 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:54:06 +0300 Subject: [PATCH] Expose `PortableType` as public (#188) * Expose `PortableType` as public Signed-off-by: Alexandru Vasile * Add documentation for the PortableType' fields Signed-off-by: Alexandru Vasile --------- Signed-off-by: Alexandru Vasile --- src/lib.rs | 1 + src/portable.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 90613705..0e8a6415 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -348,6 +348,7 @@ pub use self::{ portable::{ PortableRegistry, PortableRegistryBuilder, + PortableType, }, registry::{ IntoPortable, diff --git a/src/portable.rs b/src/portable.rs index 133f0594..88bd9e9f 100644 --- a/src/portable.rs +++ b/src/portable.rs @@ -238,8 +238,10 @@ impl PortableRegistry { #[cfg_attr(any(feature = "std", feature = "decode"), derive(scale::Decode))] #[derive(Clone, Debug, PartialEq, Eq, Encode)] pub struct PortableType { + /// The ID of the portable type. #[codec(compact)] pub id: u32, + /// The portable form of the type. #[cfg_attr(feature = "serde", serde(rename = "type"))] pub ty: Type, }