[][src]Struct rawcmd::Command

pub struct Command { /* fields omitted */ }

Command structure which represents command-line task.

Implementations

impl Command[src]

Command structure implementation.

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

Returns name.

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

Returns about.

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

Returns description.

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

Returns author.

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

Returns version.

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

Returns flags.

pub fn resources(&self) -> &Vec<Resource>[src]

Returns resources.

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

Returns commands.

impl Command[src]

Command structure implementation.

pub fn with_name<S: Into<String>>(name: S) -> Self[src]

Returns new instance.

pub fn with_about<S: Into<String>>(self, val: S) -> Self[src]

Sets about.

pub fn with_description<S: Into<String>>(self, val: S) -> Self[src]

Sets description.

pub fn with_author<S: Into<String>>(self, val: S) -> Self[src]

Sets about.

pub fn with_version<S: Into<String>>(self, val: S) -> Self[src]

Sets version.

pub fn with_resolver(self, resolver: CommandResolver) -> Self[src]

Sets resolver function.

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

Adds flag.

pub fn with_resource(self, resource: Resource) -> Self[src]

Adds resource.

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

Adds subcommand.

pub fn run(self) -> Result<usize>[src]

Executes as a command-line application.

pub fn run_args<S>(self, args: Vec<S>) -> Result<usize> where
    S: Into<String>, 
[src]

Executes as a command-line application.

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, 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.