pub enum Event<'t, 'a, 'v> {
Command(&'t Command<'t>),
Flag {
flag: &'t Flag<'t>,
value: Option<&'v [u8]>,
negated: bool,
},
Arg {
arg: &'t Arg<'t>,
value: &'v [u8],
delimit: bool,
},
External {
values: &'a [&'v OsStr],
},
}Expand description
Something the parser bound.
Variants§
Command(&'t Command<'t>)
A subcommand was selected; parsing continues inside it.
Flag
A flag was given. value is Some for a flag that takes one, and
negated is true when the flag was set through its negate form.
Arg
A word was bound to a positional argument. A variadic argument produces one event per value.
Fields
External
An unmatched word was forwarded as an external command: the name, then every remaining token, including flags.
Trait Implementations§
impl<'t, 'a, 'v> Copy for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> Eq for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> StructuralPartialEq for Event<'t, 'a, 'v>
Auto Trait Implementations§
impl<'t, 'a, 'v> Freeze for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> RefUnwindSafe for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> Send for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> Sync for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> Unpin for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> UnsafeUnpin for Event<'t, 'a, 'v>
impl<'t, 'a, 'v> UnwindSafe for Event<'t, 'a, 'v>
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