pub struct CliOptionParser { /* private fields */ }Expand description
Struct to parse the option arguments Ignores invalid arguments passed
Implementations§
Source§impl CliOptionParser
impl CliOptionParser
Sourcepub fn new(header: String, footer: String) -> CliOptionParser
pub fn new(header: String, footer: String) -> CliOptionParser
Gives a new instance of CliOptionParser
Sourcepub fn is_enabled(&self, name: &str) -> bool
pub fn is_enabled(&self, name: &str) -> bool
Checks if an option with the given name is present/enabled
Sourcepub fn get_option_values(&self, name: &str) -> &Vec<String>
pub fn get_option_values(&self, name: &str) -> &Vec<String>
if an option with the given name is enabled, returns the reference to value list
else returns an empty list
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CliOptionParser
impl RefUnwindSafe for CliOptionParser
impl Send for CliOptionParser
impl Sync for CliOptionParser
impl Unpin for CliOptionParser
impl UnwindSafe for CliOptionParser
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