pub struct RepeatedSyntax {
pub name: Cow<'static, str>,
pub type_syn: RepeatedTypeSyntax,
pub sep: ArgSepSyntax,
pub require_one: bool,
pub allow_missing: bool,
}
Expand description
Details to compile a repeated parameter.
The repeated parameter must appear after all singular positional parameters.
Fields§
§name: Cow<'static, str>
The name of the parameter for help purposes.
type_syn: RepeatedTypeSyntax
The type of the expected parameters.
sep: ArgSepSyntax
The separator to expect between the repeated parameters. For functions, this must be the long separator (the comma).
require_one: bool
Whether the repeated parameter must at least have one element or not.
allow_missing: bool
Whether to allow any parameter to not be present or not. Can only be true for commands.
Trait Implementations§
Source§impl Clone for RepeatedSyntax
impl Clone for RepeatedSyntax
Source§fn clone(&self) -> RepeatedSyntax
fn clone(&self) -> RepeatedSyntax
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RepeatedSyntax
impl RefUnwindSafe for RepeatedSyntax
impl Send for RepeatedSyntax
impl Sync for RepeatedSyntax
impl Unpin for RepeatedSyntax
impl UnwindSafe for RepeatedSyntax
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more