Generates the final `CallableMetadata` object, ensuring the minimal set of values are present. Only useful for testing.
(mut self)
| 551 | /// Generates the final `CallableMetadata` object, ensuring the minimal set of values are |
| 552 | /// present. Only useful for testing. |
| 553 | pub fn test_build(mut self) -> Rc<CallableMetadata> { |
| 554 | if self.syntaxes.is_empty() { |
| 555 | self.syntaxes.push(CallableSyntax::new_static(&[], None)); |
| 556 | } |
| 557 | Rc::from(CallableMetadata { |
| 558 | name: self.name, |
| 559 | return_type: self.return_type, |
| 560 | is_async: self.is_async, |
| 561 | syntaxes: self.syntaxes, |
| 562 | category: self.category.unwrap_or(""), |
| 563 | description: self.description.unwrap_or(""), |
| 564 | }) |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | /// Representation of a callable's metadata. |
no test coverage detected