pub struct typeFlag<T> { /* private fields */ }Implementations§
Source§impl<T> typeFlag<T>
impl<T> typeFlag<T>
Sourcepub fn setDefault(self, value: T) -> Self
pub fn setDefault(self, value: T) -> Self
Sets the default value of the created flag.
It accepts a value of type T as an arguments.
This function is optional if not called the argument will be considered required and parse will exit and show the help message and tryParse will return Err(ArgumentError) in the case of user not providing the argument.
This function can only be called after new function.
§Example:
ⓘ
let arg = SCLP::strFlag::new().setHelp("Arg help text.").setDefault("abc");Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for typeFlag<T>where
T: Freeze,
impl<T> RefUnwindSafe for typeFlag<T>where
T: RefUnwindSafe,
impl<T> Send for typeFlag<T>where
T: Send,
impl<T> Sync for typeFlag<T>where
T: Sync,
impl<T> Unpin for typeFlag<T>where
T: Unpin,
impl<T> UnwindSafe for typeFlag<T>where
T: UnwindSafe,
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