Skip to main content

StructOptUtils

Trait StructOptUtils 

Source
pub trait StructOptUtils: StructOpt + Sized {
    // Provided methods
    fn strict_from_iter(
        input: impl IntoIterator<Item = impl Into<OsString> + Clone>,
    ) -> Self { ... }
    fn strict_from_args() -> Self { ... }
    fn run_completion_generator(name: &str, bin: &str) { ... }
}
Expand description

Utility trait for all StructOpt types.

Provided Methods§

Source

fn strict_from_iter( input: impl IntoIterator<Item = impl Into<OsString> + Clone>, ) -> Self

If the flags are invalid or unknown, print error and exit with code 1. If --help, print help message and exit with code 0. If --version, print version and exit with code 0. Otherwise, return parsing result.

Source

fn strict_from_args() -> Self

Apply parse_strict on main CLI arguments.

Source

fn run_completion_generator(name: &str, bin: &str)

Run completion generator program.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Args: StructOpt> StructOptUtils for Args