Struct dia_args::docs::Docs

source ·
pub struct Docs<'a> {
    pub name: Cow<'a, str>,
    pub docs: Cow<'a, str>,
    pub cfg: Cfg,
    pub i18n: I18n<'a>,
    pub options: Option<Vec<Cow<'a, Option<'a>>>>,
    pub commands: Option<Vec<Cow<'a, Cmd<'a>>>>,
    pub project: Option<Project<'a>>,
}
Expand description

§Documentation

Fields§

§name: Cow<'a, str>

§Name

§docs: Cow<'a, str>

§Documentation

§cfg: Cfg

§Configuration

§i18n: I18n<'a>

§Internatinonalization

§options: Option<Vec<Cow<'a, Option<'a>>>>

§Options

§commands: Option<Vec<Cow<'a, Cmd<'a>>>>

§Commands

§project: Option<Project<'a>>

§Project

Implementations§

source§

impl<'a> Docs<'a>

source

pub fn new(name: Cow<'a, str>, docs: Cow<'a, str>) -> Self

§Makes new instance with default configurations
source

pub fn print(self) -> Result<()>

§Prints this documentation to stdout

Trait Implementations§

source§

impl Display for Docs<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Docs<'a>

§

impl<'a> RefUnwindSafe for Docs<'a>

§

impl<'a> Send for Docs<'a>

§

impl<'a> Sync for Docs<'a>

§

impl<'a> Unpin for Docs<'a>

§

impl<'a> UnwindSafe for Docs<'a>

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
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.