pub struct HelpPage { /* private fields */ }Expand description
A full --help page: a name/version line, usage line(s), an optional
blurb, a list of Sections, and an optional footer (e.g. fasthex’s
size-suffix legend).
Implementations§
Source§impl HelpPage
impl HelpPage
pub fn new(name_line: impl Into<String>) -> Self
pub fn usage(self, line: impl Into<String>) -> Self
pub fn blurb(self, text: impl Into<String>) -> Self
pub fn section(self, section: Section) -> Self
Sourcepub fn desc_column(self, col: usize) -> Self
pub fn desc_column(self, col: usize) -> Self
Override the description column (default 28, matching all four tools today).
pub fn theme(self, theme: Theme) -> Self
Sourcepub fn render(&self, color: bool) -> String
pub fn render(&self, color: bool) -> String
Render the page to a String. color is typically the resolved
bool from ColorWhen::resolve.
Auto Trait Implementations§
impl Freeze for HelpPage
impl RefUnwindSafe for HelpPage
impl Send for HelpPage
impl Sync for HelpPage
impl Unpin for HelpPage
impl UnsafeUnpin for HelpPage
impl UnwindSafe for HelpPage
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