pub enum ClapSource {
None,
Args(Vec<String>),
Matches(ArgMatches),
}
Expand description
Replacement of the command line source.
Variants§
None
Same as ClapSource::Args(Vec::new()).
Args(Vec<String>)
Values of the command line source will be got from the passed arguments (like they were the command line arguments).
Can be useful in testing.
Matches(ArgMatches)
Values of the command line source will be got from the passed ArgMatches.
Can be useful if the configuration is a subcommand of the main programm.
Trait Implementations§
Source§impl Clone for ClapSource
impl Clone for ClapSource
Source§fn clone(&self) -> ClapSource
fn clone(&self) -> ClapSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClapSource
impl !RefUnwindSafe for ClapSource
impl Send for ClapSource
impl Sync for ClapSource
impl Unpin for ClapSource
impl !UnwindSafe for ClapSource
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