Struct ap::App [−][src]
pub struct App<'a> { /* fields omitted */ }
Expand description
The main object used to represent the program.
All consumers of the crate need to create a single object of this type.
Implementations
impl<'a> App<'a>
[src]
impl<'a> App<'a>
[src]pub fn args(self, args: Args) -> Self
[src]
pub fn args(self, args: Args) -> Self
[src]Specify a set of argument handlers to parse the command-line with.
pub fn ignore_unknown_options(self) -> Self
[src]
pub fn ignore_unknown_options(self) -> Self
[src]If set, don’t error if unknown options are specified - just ignore them.
Note
This is an alternative to calling the settings()
method.
pub fn ignore_unknown_posn_args(self) -> Self
[src]
pub fn ignore_unknown_posn_args(self) -> Self
[src]If set, don’t error if unknown positional arguments are specified - just ignore them.
Note
This is an alternative to calling the settings()
method.
pub fn no_strict_options(self) -> Self
[src]
pub fn no_strict_options(self) -> Self
[src]pub fn generate_help<W>(&self, writer: &mut W) -> Result<()> where
W: Write + Send + Sync + 'static,
[src]
pub fn generate_help<W>(&self, writer: &mut W) -> Result<()> where
W: Write + Send + Sync + 'static,
[src]pub fn parse_with_args(&mut self, cli_args: Vec<String>) -> Result<()>
[src]
pub fn parse_with_args(&mut self, cli_args: Vec<String>) -> Result<()>
[src]Parse a set of command line arguments (without the program name).
Arguments
cli_args
: Vector of string arguments. Specify your own, or call get_args().
Notes
- The
cli_args
vector must not specify the command name (which by default is returned as the first element byenv::args().collect()
for example. Use get_args() as this handles this for you.
Trait Implementations
impl<'a> StructuralPartialEq for App<'a>
[src]
Auto Trait Implementations
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more