pub struct HelpConfig {
pub default_scope: HelpScope,
pub default_format: HelpFormat,
}Expand description
Configuration for pre-clap help handling.
The handler scans raw argv before Cli::try_parse() so applications can
support requests such as --help --output markdown without clap exiting
early with DisplayHelp.
Requires the cli-help feature.
Fields§
§default_scope: HelpScopeScope used for --help / -h when --recursive is absent.
default_format: HelpFormatFormat used for help when no explicit --output is present.
Implementations§
Source§impl HelpConfig
impl HelpConfig
Sourcepub const fn human_cli_default() -> Self
pub const fn human_cli_default() -> Self
The blessed preset for CLIs.
--help renders one-level plain help by default. Scope and format are
orthogonal: --recursive expands the selected command subtree, while
--output json|yaml|markdown picks the format. So --help --recursive
is recursive plain text and --help --recursive --output markdown is a
recursive Markdown export.
Trait Implementations§
Source§impl Clone for HelpConfig
impl Clone for HelpConfig
Source§fn clone(&self) -> HelpConfig
fn clone(&self) -> HelpConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HelpConfig
impl Debug for HelpConfig
impl Eq for HelpConfig
Source§impl PartialEq for HelpConfig
impl PartialEq for HelpConfig
impl StructuralPartialEq for HelpConfig
Auto Trait Implementations§
impl Freeze for HelpConfig
impl RefUnwindSafe for HelpConfig
impl Send for HelpConfig
impl Sync for HelpConfig
impl Unpin for HelpConfig
impl UnsafeUnpin for HelpConfig
impl UnwindSafe for HelpConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.