[−][src]Struct rawcmd::Command
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,