[][src]Struct combu::command::Command

pub struct Command {
    pub name: String,
    pub action: Option<Action>,
    pub authors: String,
    pub copyright: String,
    pub description: Option<String>,
    pub usage: String,
    pub l_flags: Vector<Flag>,
    pub c_flags: Vector<Flag>,
    pub version: String,
    pub sub: Vector<Command>,
    pub opt_values: Vector<KeyValuePair>,
}

Fields

name: Stringaction: Option<Action>authors: Stringcopyright: Stringdescription: Option<String>usage: Stringl_flags: Vector<Flag>c_flags: Vector<Flag>version: Stringsub: Vector<Command>opt_values: Vector<KeyValuePair>

Methods

impl Command[src]

pub fn new() -> Command[src]

pub fn build_new(
    name: String,
    action: Option<Action>,
    authors: String,
    copyright: String,
    description: Option<String>,
    usage: String,
    local_flags: Vector<Flag>,
    common_flags: Vector<Flag>,
    version: String,
    sub: Vector<Command>,
    opt_values: Vector<(String, String)>
) -> Command
[src]

pub fn run_with_auto_arg_collect(self)[src]

pub fn single_run(self, args: Vec<String>)[src]

pub fn show_help(self)[src]

pub fn name<T: Into<String>>(self, name: T) -> Command[src]

pub fn usage<T: Into<String>>(self, usage: T) -> Self[src]

pub fn action(self, action: Action) -> Self[src]

pub fn authors<T: Into<String>>(self, authors: T) -> Self[src]

pub fn copyright<T: Into<String>>(self, copyright: T) -> Self[src]

pub fn local_flag(self, flag: Flag) -> Self[src]

pub fn common_flag(self, flag: Flag) -> Self[src]

pub fn desctiption<T: Into<String>>(self, description: T) -> Self[src]

pub fn version<T: Into<String>>(self, version: T) -> Self[src]

pub fn sub_command(self, sub_command: Command) -> Self[src]

pub fn add_opt_prop(self, opt_prop: KeyValuePair) -> Self[src]

Trait Implementations

impl Clone for Command[src]

impl Default for Command[src]

impl From<String> for Command[src]

impl Run<Context> for Command[src]

impl Run<Vec<String>> for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.