pub struct Builder { /* private fields */ }Expand description
Build a ManualPage or several. The main command is sq itself. It can have multiple levels of subcommands, and we treat the leaves of the subcommand tree specially: every leaf gets a manual page, and every intermediate node gets an overview page. For example, “sq encrypt” is a leaf, as is “sq key generate”, but “sq key” is not.
Implementations§
Source§impl Builder
 
impl Builder
Sourcepub fn new(
    cmd: &mut Command,
    version: &str,
    extra_version: Option<&str>,
) -> Self
 
pub fn new( cmd: &mut Command, version: &str, extra_version: Option<&str>, ) -> Self
Return a builder to generate manual page.
cmd is a clap::Command that has been built to represent
the sq command line interface. The manual pages are generated
automatically from that information.
version is the bare version, which is usually obtained from
env!("CARGO_PKG_VERSION").
If extra_version is Some, then the version is created
version (extra_version).
For sequoia packages, this is usually:
format!("sequoia-openpgp {}", sequoia_openpgp::VERSION).
Sourcepub fn date(&mut self, date: &str) -> &mut Self
 
pub fn date(&mut self, date: &str) -> &mut Self
Set the date for the manual page. This is typically typeset in the center of the footer of the page.
Sourcepub fn source(&mut self, source: &str) -> &mut Self
 
pub fn source(&mut self, source: &str) -> &mut Self
Set the source of the manual page. This is typically typeset on left of the footer of the page.
Sourcepub fn manual(&mut self, manual: &str) -> &mut Self
 
pub fn manual(&mut self, manual: &str) -> &mut Self
Set the manual this page belongs to. This is typically typeset on the center of the header of the page.
Sourcepub fn see_also<S>(&mut self, see_also: &[S]) -> &mut Self
 
pub fn see_also<S>(&mut self, see_also: &[S]) -> &mut Self
Text that is added to the see also section.
For example:
For the full documentation see <https://book.sequoia-pgp.org>.Sourcepub fn build(&self) -> Vec<ManualPage>
 
pub fn build(&self) -> Vec<ManualPage>
Build all manual pages for sq and one for each leaf subcommand.