get the function signature.
(&self)
| 554 | |
| 555 | /// get the function signature. |
| 556 | pub fn gen_signature(&self) -> String { |
| 557 | let ret_type = &self.alias_ret_type; |
| 558 | let name = &self.name; |
| 559 | let mut args = String::new(); |
| 560 | for (index, ty) in self.alias_arg_types.iter().enumerate() { |
| 561 | let ident = &self.arg_idents[index]; |
| 562 | let (ty, size) = split_ty_with_size(ty); |
| 563 | let arg = if let Some(size) = size { |
| 564 | format!("{ty} {ident}{size}") |
| 565 | } else { |
| 566 | format!("{ty} {ident}") |
| 567 | }; |
| 568 | args.push_str(&arg); |
| 569 | if index != self.alias_arg_types.len() - 1 { |
| 570 | args.push_str(", "); |
| 571 | } |
| 572 | } |
| 573 | let sig = format!("{ret_type}{name}({args})"); |
| 574 | sig |
| 575 | } |
| 576 | |
| 577 | pub fn get_alias_arg_types(&self) -> &Vec<String> { |
| 578 | &self.alias_arg_types |
no test coverage detected