Sets the syntax specifications for this callable.
(
self,
syntaxes: Vec<(Vec<SingularArgSyntax>, Option<RepeatedSyntax>)>,
)
| 506 | |
| 507 | /// Sets the syntax specifications for this callable. |
| 508 | pub(crate) fn with_dynamic_syntax( |
| 509 | self, |
| 510 | syntaxes: Vec<(Vec<SingularArgSyntax>, Option<RepeatedSyntax>)>, |
| 511 | ) -> Self { |
| 512 | let syntaxes = syntaxes |
| 513 | .into_iter() |
| 514 | .map(|s| CallableSyntax::new_dynamic(s.0, s.1)) |
| 515 | .collect::<Vec<CallableSyntax>>(); |
| 516 | self.with_syntaxes(syntaxes) |
| 517 | } |
| 518 | |
| 519 | /// Sets the category for this callable. All callables with the same category name will be |
| 520 | /// grouped together in help messages. |
no test coverage detected