pub struct Command {
pub path: &'static [&'static str],
pub args: &'static str,
pub summary: &'static str,
pub min_pos: usize,
pub max_pos: usize,
pub opts: Vec<Opt>,
pub run: fn(&mut Ctx<'_>, &Parsed) -> Result<(), CliError>,
}Expand description
For the commands: the options, a command name and a list of options inside a table.
Fields§
§path: &'static [&'static str]§args: &'static strThe positional arguments, for the usage line (<name>).
summary: &'static str§min_pos: usize§max_pos: usize§opts: Vec<Opt>§run: fn(&mut Ctx<'_>, &Parsed) -> Result<(), CliError>Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more