pub struct Arg { /* private fields */ }Expand description
Command-line argument specification
Defines a flag or option with optional short/long forms. Can be boolean (flag) or value-taking (option).
Implementations§
Source§impl Arg
impl Arg
pub fn new(name: impl Into<String>) -> Self
pub fn long(self, long: impl Into<String>) -> Self
pub fn short(self, short: char) -> Self
pub fn help(self, help: impl Into<String>) -> Self
pub fn takes_value(self, takes: bool) -> Self
pub fn required(self, req: bool) -> Self
Auto Trait Implementations§
impl Freeze for Arg
impl RefUnwindSafe for Arg
impl Send for Arg
impl Sync for Arg
impl Unpin for Arg
impl UnwindSafe for Arg
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