Struct rust_utils::linux::ManpageBuilder

source ·
pub struct ManpageBuilder { /* private fields */ }
Expand description

Basic unix manpage generator

Implementations§

source§

impl ManpageBuilder

source

pub fn name(self, name: String) -> Self

source

pub fn short_desc(self, short_desc: String) -> Self

source

pub fn desc(self, desc: String) -> Self

source

pub fn author_name(self, author_name: String) -> Self

source

pub fn author_email(self, author_email: String) -> Self

source

pub fn name_comment(self, name_comment: impl Into<String>) -> Self

Add in a comment next to the name in the file comment

source

pub fn other_pages(self, other_pages: Vec<String>) -> Self

source

pub fn other_sections(self, other_sections: HashMap<String, String>) -> Self

source§

impl ManpageBuilder

source

pub fn new( name: &str, short_desc: &str, author_name: &str, author_email: &str, desc: &str, ) -> Self

Create a new ManpageBuilder

source

pub fn other_page(self, name: &str) -> Self

Add a link to a page in the “SEE ALSO” section

source

pub fn section(self, name: &str, text: &str) -> Self

Add in a section

The name should be in all capital letters

source

pub fn build<P: Into<PathBuf>>(&self, app_ver: &str, path: P)

Generate and save the manpage at the specified path

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.