Sets the syntax specifications for this callable.
(
mut self,
syntaxes: &'static [(&'static [SingularArgSyntax], Option<&'static RepeatedSyntax>)],
)
| 488 | |
| 489 | /// Sets the syntax specifications for this callable. |
| 490 | pub fn with_syntax( |
| 491 | mut self, |
| 492 | syntaxes: &'static [(&'static [SingularArgSyntax], Option<&'static RepeatedSyntax>)], |
| 493 | ) -> Self { |
| 494 | self.syntaxes = syntaxes |
| 495 | .iter() |
| 496 | .map(|s| CallableSyntax::new_static(s.0, s.1)) |
| 497 | .collect::<Vec<CallableSyntax>>(); |
| 498 | self |
| 499 | } |
| 500 | |
| 501 | /// Sets the syntax specifications for this callable. |
| 502 | pub(crate) fn with_syntaxes<S: Into<Vec<CallableSyntax>>>(mut self, syntaxes: S) -> Self { |