Struct clap_mangen::Man
source · [−]pub struct Man<'a> { /* private fields */ }
Expand description
A manpage writer
Implementations
sourceimpl<'a> Man<'a>
impl<'a> Man<'a>
Build a Man
sourcepub fn title(self, title: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
Override the default man page title, written in all caps
sourcepub fn section(self, section: impl Into<String>) -> Self
pub fn section(self, section: impl Into<String>) -> Self
Override the default section this man page is placed in
Common values:
"1"
: User Commands"2"
: System Calls"3"
: C Library Functions"4"
: Devices and Special Files"5"
: File Formats and Conventions"6"
: Games et. al."7"
: Miscellanea"8"
: System Administration tools and Daemons
sourcepub fn date(self, date: impl Into<String>) -> Self
pub fn date(self, date: impl Into<String>) -> Self
Override the default date for the last non-trivial change to this man page
Dates should be written in the form YYYY-MM-DD
.
sourceimpl<'a> Man<'a>
impl<'a> Man<'a>
Generate ROFF output
sourcepub fn render(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render(&self, w: &mut dyn Write) -> Result<(), Error>
Render a full manual page into the writer.
If customization is needed, you can call the individual sections you want and mix them into your own ROFF content.
sourcepub fn render_title(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_title(&self, w: &mut dyn Write) -> Result<(), Error>
Render the title into the writer.
sourcepub fn render_name_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_name_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the NAME section into the writer.
sourcepub fn render_synopsis_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_synopsis_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the SYNOPSIS section into the writer.
sourcepub fn render_description_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_description_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the DESCRIPTION section into the writer.
sourcepub fn render_options_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_options_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the OPTIONS section into the writer.
sourcepub fn render_subcommands_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_subcommands_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the SUBCOMMANDS section into the writer.
sourcepub fn render_extra_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_extra_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the EXTRA section into the writer.
sourcepub fn render_version_section(&self, w: &mut dyn Write) -> Result<(), Error>
pub fn render_version_section(&self, w: &mut dyn Write) -> Result<(), Error>
Render the VERSION section into the writer.
Render the AUTHORS section into the writer.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Man<'a>
impl<'a> Send for Man<'a>
impl<'a> Sync for Man<'a>
impl<'a> Unpin for Man<'a>
impl<'a> !UnwindSafe for Man<'a>
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