message: [lang] Add initial support for Tuples in api description
diff: @@ -69,6 +69,10 @@ pub enum TypeDescription {
  Address,
  /// The SRML balance type.
  Balance,
  + /// Tuple type
  + Tuple {
  + elems: Vec<TypeDescription>,
  + },
  }
  impl TryFrom<&syn::Type> for TypeDescription {
  @@ -76,6 +80,7 @@ impl TryFrom<&syn::Type> for TypeDescription {
  fn try_from(ty: &syn::Type) -> Result<Self> {
  use quote::ToTokens;
  + let primitive = |ty: &syn::Type| {
  match ty.into_token_stream().to_string().as_str() {
  "bool" => Ok(TypeDescription::Bool),
  "u8" => Ok(TypeDescription::U8),
  @@ -98,6 +103,18 @@ impl TryFrom<&syn::Type> for TypeDescription {
  )
  }
  }
  + };
  + match ty {
  + syn::Type::Tuple(tuple) => {
  + let elems = tuple
  + .elems
  + .iter()
  + .map(primitive)
  + .collect::<Result<_>>()?;
  + Ok(TypeDescription::Tuple { elems })
  + },
  + ty=> primitive(ty),
  + }
  }
  }
  