Usage

Trait Usage 

Source
pub trait Usage {
    const NAME: &'static str;
    const DESCRIPTION: Description<'static>;
    const ITEMS: UsageItems<'static>;
}
Expand description

A comprehensive description of the CLI parameters for a given FromArgs type. A type’s Usage is used to create a --help usage message. This trait is usually derived.

Required Associated Constants§

Source

const NAME: &'static str

The name of the command. Can be replaced with argv[0].

Source

const DESCRIPTION: Description<'static>

The top-level text description of the whole command.

Source

const ITEMS: UsageItems<'static>

The items (parameters, subcommands, and so on) in this command.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Usage> Usage for Option<T>

Source§

const NAME: &'static str = T::NAME

Source§

const DESCRIPTION: Description<'static> = T::DESCRIPTION

Source§

const ITEMS: UsageItems<'static>

Implementors§