[−][src]Trait entrance::Options
A trait for parsing and containing options.
Example
use entrance::{Command, Options}; #[derive(Options)] enum Opts { #[entrance(description = "Print help message")] #[entrance(short = 'h')] #[entrance(informative(entrance::help))] Help, #[entrance(description = "Print version infomation")] #[entrance(informative(entrance::version))] Version, }
Limitation
The derive macro for Options
supports only an Enum whose variants don't have any field.
Required methods
fn parse(option: OptionItem) -> Result<Self>
fn is_informative(&self) -> bool
fn trigger_informative<Args: Arguments>(&self, command: &Command<Self, Args>)
fn spec() -> &'static [Opt]
This associated function is for HelpDisplay
.