CommandBuilder

Trait CommandBuilder 

Source
pub trait CommandBuilder: Sized {
    // Required methods
    fn flag(self, flag: &str) -> Self;
    fn option(self, key: &str, value: &str) -> Self;
}
Expand description

Helper trait for building commands with a fluent interface

Required Methods§

Source

fn flag(self, flag: &str) -> Self

Add a flag (e.g., “–web”)

Source

fn option(self, key: &str, value: &str) -> Self

Add a flag with a value (e.g., “–repo”, “owner/name”)

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.

Implementors§