Skip to content

Commit

Permalink
Expose PortableType as public (#188)
Browse files Browse the repository at this point in the history
* Expose `PortableType` as public

Signed-off-by: Alexandru Vasile <[email protected]>

* Add documentation for the PortableType' fields

Signed-off-by: Alexandru Vasile <[email protected]>

---------

Signed-off-by: Alexandru Vasile <[email protected]>
  • Loading branch information
lexnv authored Jul 3, 2023
1 parent 76be3c7 commit cf1aae8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ pub use self::{
portable::{
PortableRegistry,
PortableRegistryBuilder,
PortableType,
},
registry::{
IntoPortable,
Expand Down
2 changes: 2 additions & 0 deletions src/portable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PortableForm>,
}
Expand Down

0 comments on commit cf1aae8

Please sign in to comment.