[−][src]Struct climake::CliArgument
A single argument in a list of arguments to parse later in CliMake::parse.
Example inititation
ⓘThis example is not tested
let arg_onetwo = CliArgument.new( vec!['o', 't'], vec!["onetwo"], Some("This is some detailed help for onetwo"), Box::new(&to_run_for_onetwo) );
Fields
help_str: &'static str
Inner-command help for a specific argument. See CliArgument::help_msg for a better help representation.
Implementations
impl CliArgument
[src]
pub fn new(
short_calls: Vec<char>,
long_calls: Vec<&'static str>,
help: Option<&'static str>,
run: Box<dyn FnMut(Vec<String>)>
) -> Self
[src]
short_calls: Vec<char>,
long_calls: Vec<&'static str>,
help: Option<&'static str>,
run: Box<dyn FnMut(Vec<String>)>
) -> Self
Creates a new argument in a simplistic manner.
pub fn help_msg(&self) -> String
[src]
Gives in-depth details and running infomation compared to the plaintext CliArgument::help_str, reccomended to use.
Example results
Both below are taken from the dynamic args example:
Usage: ./dynamic_args [-q, -r, -s, --hi, --second] [CONTENT]
About:
Simple help
Usage: ./dynamic_args [-a, -b, -c, --other, --thing] [CONTENT]
About:
Other help
Auto Trait Implementations
impl !RefUnwindSafe for CliArgument
impl !Send for CliArgument
impl !Sync for CliArgument
impl Unpin for CliArgument
impl !UnwindSafe for CliArgument
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,