pub struct App<'a> { /* private fields */ }Expand description
Xcli object
Implementations§
Source§impl<'a> App<'a>
impl<'a> App<'a>
Get the author of this instance
Sourcepub fn get_version(&self) -> &str
pub fn get_version(&self) -> &str
Get the version of this instance
Set the author of this instance
Sourcepub fn add_subcommand(&mut self, subcmd: Command<'a>)
pub fn add_subcommand(&mut self, subcmd: Command<'a>)
Add sub commands to command tree.
Sourcepub fn add_subcommand_with_userdata(
&mut self,
subcmd: Command<'a>,
value: Box<dyn Any>,
)
pub fn add_subcommand_with_userdata( &mut self, subcmd: Command<'a>, value: Box<dyn Any>, )
Add sub commands to commands, with user defined data.
userdata must be an IAny trait object, which will be associated with the command name of the subcmd.
Auto Trait Implementations§
impl<'a> Freeze for App<'a>
impl<'a> !RefUnwindSafe for App<'a>
impl<'a> !Send for App<'a>
impl<'a> !Sync for App<'a>
impl<'a> Unpin for App<'a>
impl<'a> !UnwindSafe for App<'a>
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