[−][src]Struct climake::Argument
A single argument used inside of [CLIMaker].
Fields
short_call: Option<char>
A short call parameter that is used with a prefix of a single hyphen (-
).
standalone_call: Option<String>
A long call parameter. This allows a user to enter something like
./test hello
instead of ./test --hello
.
got_param: bool
Allows it to capture next element inside of arguments. This is
experimental and can be buggy if you do something like hello hello
that will go on forever.
help: Option<String>
Help message (highly reccomended).
run: Box<dyn Fn(Option<String>)>
Item to run when asked to execute, this should be the main usage of
the argument. The Option<String> is linked to Argument::got_param.
If got_param is true
, there will always be String present, even if
inside of an Option.
Auto Trait Implementations
impl !RefUnwindSafe for Argument
impl !Send for Argument
impl !Sync for Argument
impl Unpin for Argument
impl !UnwindSafe for Argument
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>,