pub struct Parser {
pub program: &'static str,
pub version: &'static str,
pub usage: String,
}Fields§
§program: &'static str§version: &'static str§usage: StringImplementations§
Source§impl Parser
impl Parser
pub fn new() -> Self
pub fn program(&mut self) -> &str
pub fn set_program(&mut self, program: &'static str)
pub fn version(&mut self) -> &str
pub fn set_version(&mut self, version: &'static str)
pub fn usage(&mut self) -> &String
pub fn set_usage(&mut self, usage: String)
pub fn print_version(&self)
pub fn print_usage(&self)
pub fn parse_from(&self, args: impl Iterator<Item = String>)
pub fn parse(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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