pub struct MyCLI { /* private fields */ }Expand description
A simple CLI.
inputs are anything that does not starts with - and flags are anything that does starts with -
Implementations§
Source§impl MyCLI
impl MyCLI
Sourcepub fn create_from_args() -> Self
pub fn create_from_args() -> Self
Sourcepub fn create_with_args(
program: String,
args: impl Iterator<Item = String>,
) -> Self
pub fn create_with_args( program: String, args: impl Iterator<Item = String>, ) -> Self
Create [MyCLIParser] with provided arguments.
pub fn get_matches(&self) -> Option<(&str, MatchedFlags, MatchedArgs)>
pub fn add_cmd(self, name: &'static str, cmd: Cmd) -> Self
pub fn usage(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MyCLI
impl RefUnwindSafe for MyCLI
impl Send for MyCLI
impl Sync for MyCLI
impl Unpin for MyCLI
impl UnwindSafe for MyCLI
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