feat(app): Introspect current help heading

This will help for #2803 so we can capture and restore the help heading
around flattened derives.
This commit is contained in:
Ed Page 2021-10-14 11:43:16 -05:00
parent a570976d92
commit 5bbcc0f4ba

View file

@ -146,6 +146,14 @@ impl<'help> App<'help> {
self.long_about
}
/// Get the custom section heading specified via [`App::help_heading`].
///
/// [`App::help_heading`]: App::help_heading()
#[inline]
pub fn get_help_heading(&self) -> Option<&'help str> {
self.current_help_heading
}
/// Iterate through the *visible* aliases for this subcommand.
#[inline]
pub fn get_visible_aliases(&self) -> impl Iterator<Item = &str> {