pub(crate) struct OptGroup {
pub(crate) short_name: String,
pub(crate) long_name: String,
pub(crate) hint: String,
pub(crate) desc: String,
pub(crate) hasarg: HasArg,
pub(crate) occur: Occur,
}
Expand description
One group of options, e.g., both -h
and --help
, along with
their shared description and properties.
Fields
short_name: String
Short name of the option, e.g. h
for a -h
option
long_name: String
Long name of the option, e.g. help
for a --help
option
hint: String
Hint for argument, e.g. FILE
for a -o FILE
option
desc: String
Description for usage help text
hasarg: HasArg
Whether option has an argument
occur: Occur
How often it can occur
Implementations
sourceimpl OptGroup
impl OptGroup
sourcepub(crate) fn long_to_short(&self) -> Opt
pub(crate) fn long_to_short(&self) -> Opt
Translate OptGroup into Opt. (Both short and long names correspond to different Opts).
Trait Implementations
impl Eq for OptGroup
impl StructuralEq for OptGroup
impl StructuralPartialEq for OptGroup
Auto Trait Implementations
impl RefUnwindSafe for OptGroup
impl Send for OptGroup
impl Sync for OptGroup
impl Unpin for OptGroup
impl UnwindSafe for OptGroup
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more