[][src]Struct abscissa::EntryPoint

pub struct EntryPoint<Cmd: Runnable + Command> {
    pub config: Option<PathBuf>,
    pub help: bool,
    pub verbose: bool,
    pub command: Option<Cmd>,
}

Toplevel entrypoint command.

Handles obtaining toplevel help as well as verbosity settings.

Fields

config: Option<PathBuf>

Path to the configuration file

help: bool

Obtain help about the current command

verbose: bool

Increase verbosity setting

command: Option<Cmd>

Subcommand to execute.

The command option will delegate option parsing to the command type, starting at the first free argument.

Trait Implementations

impl<Cmd> Command for EntryPoint<Cmd> where
    Cmd: Runnable + Command
[src]

fn name() -> &'static str[src]

Name of this program as a string

fn description() -> &'static str[src]

Description of this program

fn version() -> &'static str[src]

Version of this program

fn authors() -> &'static str[src]

Authors of this program

fn subcommand_usage(command: &str) -> Option<Usage>[src]

Get usage information for a particular subcommand (if available)

fn from_args<A: IntoIterator<Item = String>>(into_args: A) -> Self[src]

Parse command-line arguments from a string iterator

fn from_env_args() -> Self[src]

Parse command-line arguments from the environment

fn print_usage_and_exit(args: &[String]) -> ![src]

Print usage information and exit

impl<Cfg, Cmd> Configurable<Cfg> for EntryPoint<Cmd> where
    Cmd: Runnable + Command,
    Cfg: Config
[src]

fn config_path(&self) -> Option<PathBuf>[src]

Path to the command's configuration file

fn load_config_file<P: AsRef<AbsPath>>(
    &self,
    path: &P
) -> Result<C, FrameworkError>
[src]

Load the configuration for this command

fn preprocess_config(&self, config: C) -> Result<C, FrameworkError>[src]

Process the configuration after it has been loaded, potentially modifying it or returning an error if options are incompatible Read more

impl<Cmd> Runnable for EntryPoint<Cmd> where
    Cmd: Runnable + Command
[src]

impl<Cmd: Debug + Runnable + Command> Debug for EntryPoint<Cmd>[src]

impl<Cmd: Runnable + Command> Options for EntryPoint<Cmd>[src]

fn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
    S: AsRef<str>, 
[src]

Parses arguments received from the command line. Read more

fn parse_args_or_exit(style: ParsingStyle) -> Self[src]

Parses arguments from the environment. Read more

fn parse_args_default_or_exit() -> Self[src]

Parses arguments from the environment, using the default parsing style. Read more

fn parse_args_default<S>(args: &[S]) -> Result<Self, Error> where
    S: AsRef<str>, 
[src]

Parses arguments received from the command line, using the default parsing style. Read more

Auto Trait Implementations

impl<Cmd> Send for EntryPoint<Cmd> where
    Cmd: Send

impl<Cmd> Unpin for EntryPoint<Cmd> where
    Cmd: Unpin

impl<Cmd> Sync for EntryPoint<Cmd> where
    Cmd: Sync

impl<Cmd> UnwindSafe for EntryPoint<Cmd> where
    Cmd: UnwindSafe

impl<Cmd> RefUnwindSafe for EntryPoint<Cmd> where
    Cmd: RefUnwindSafe

Blanket Implementations

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.

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

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

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