diff --git a/src/ty/mod.rs b/src/ty/mod.rs index f5055b29..fc02a8d4 100644 --- a/src/ty/mod.rs +++ b/src/ty/mod.rs @@ -208,6 +208,18 @@ where pub fn new(name: T::String, ty: Option) -> 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() + } + + /// Get the name of the parameter. + pub fn name(&self) -> &T::String { + &self.name + } } /// The possible types a SCALE encodable Rust value could have.