pub struct Opt {
pub arg: Arg,
pub description: Option<String>,
pub handler: Option<fn(&Optz) -> Result<(), OptzError>>,
pub long: String,
pub multiple: bool,
pub name: String,
pub short: Option<String>,
pub values: Vec<String>,
}Fields§
§arg: Arg§description: Option<String>§handler: Option<fn(&Optz) -> Result<(), OptzError>>§long: String§multiple: bool§name: String§short: Option<String>§values: Vec<String>Implementations§
Source§impl Opt
impl Opt
pub fn flag(name: &str) -> Self
pub fn arg(name: &str) -> Self
pub fn multiple(self, multiple: bool) -> Self
pub fn default_value(self, value: &str) -> Self
pub fn description(self, desc: &str) -> Self
pub fn handler(self, handler: fn(&Optz) -> Result<(), OptzError>) -> Self
pub fn short(self, short: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnsafeUnpin for Opt
impl UnwindSafe for Opt
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