[][src]Struct abscissa_core::command::Usage

pub struct Usage {
    pub package_name: String,
    pub package_version: Version,
    pub package_authors: Vec<String>,
    pub package_description: Option<String>,
    pub positionals: Vec<Positional>,
    pub flags: Vec<Flag>,
    pub subcommands: Vec<Subcommand>,
}

Presenter for usage information for a particular Command

Fields

package_name: String

Package name

package_version: Version

Package version

package_authors: Vec<String>

Package authors

package_description: Option<String>

Package description

positionals: Vec<Positional>

Command-line positional arguments

flags: Vec<Flag>

Command-line flag arguments

subcommands: Vec<Subcommand>

Subcommands

Methods

impl Usage[src]

pub fn for_command<C>() -> Self where
    C: Command
[src]

Build usage information for a particular command

pub fn print_subcommand(&self, args: &[String]) -> Result<(), Error>[src]

Print usage for a particular subcommand

pub fn print_subcommand_and_exit(&self, args: &[String]) -> ![src]

Print usage for a particular subcommand and exit

pub fn print_info(&self) -> Result<(), Error>[src]

Print program and usage information

pub fn print_usage(&self) -> Result<(), Error>[src]

Print usage information only

Trait Implementations

impl Debug for Usage[src]

Auto Trait Implementations

impl RefUnwindSafe for Usage

impl Send for Usage

impl Sync for Usage

impl Unpin for Usage

impl UnwindSafe for Usage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.