[][src]Struct rawcmd::Command

pub struct Command { /* fields omitted */ }

Command structure which represents command-line task.

Methods

impl Command[src]

Command structure implementation.

pub fn name(&self) -> &String[src]

Returns name.

pub fn description(&self) -> &Option<String>[src]

Returns description.

pub fn flags(&self) -> &Vec<Flag>[src]

Returns flags.

pub fn commands(&self) -> &Vec<Command>[src]

Returns commands.

impl Command[src]

Command structure implementation.

pub fn new(name: &str) -> Self[src]

Returns new instance.

pub fn with_description(self, val: &str) -> Self[src]

Sets description.

pub fn with_resolver(self, r: fn(_: Intent) -> Option<usize>) -> Self[src]

Sets resolver function.

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

Adds flag.

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

Adds subcommand.

pub fn perform(self, args: Vec<String>) -> Option<usize>[src]

Executes as a command-line application.

Trait Implementations

impl Clone for Command[src]

impl Debug for Command[src]

impl PartialEq<Command> for Command[src]

impl StructuralPartialEq 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.