Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ where
pub fn new(name: T::String, ty: Option<T::Type>) -> Self {
Self { name, ty }
}

/// Get the type of the parameter.
///
/// `None` if the parameter is skipped.
pub fn ty(&self) -> Option<&T::Type> {
self.ty.as_ref()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add name too while you're here?

}

/// The possible types a SCALE encodable Rust value could have.
Expand Down