pub struct Application {
pub name: String,
pub desc: String,
pub cmds: Vec<Command>,
pub opts: Vec<Options>,
pub direct_args: Vec<Argument>,
}
Expand description
Represents an application.
Application is what? Application is generated from your code.
If you use #[command]
, application will get a Command
.
If you use #[options]
, application will get a Options
.
If you write descriptions in your Cargo.toml
, application will get a desc
.
If you write version in your Cargo.toml
, application will get a ver
.
For most of the time, you will use all of them.
And we offer a way to get the only application of your CLI.
Using commander_rust::run!()
(instead of commander_rust::run()
, it’s a proc_macro) to get it.
§Note
It’s generated by commander_rust
, and it should be readonly.
Fields§
§name: String
§desc: String
§cmds: Vec<Command>
§opts: Vec<Options>
§direct_args: Vec<Argument>
Implementations§
Source§impl Application
impl Application
pub fn contains_key(&self, idx: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Application
impl RefUnwindSafe for Application
impl Send for Application
impl Sync for Application
impl Unpin for Application
impl UnwindSafe for Application
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