[−][src]Struct rawcmd::Command
Command structure which represents command-line task.
Methods
impl<'a> Command<'a>
[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<'a> Command<'a>
[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: &'a dyn Resolver) -> 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<'a>) -> Self
[src]
Adds subcommand.
pub fn run(self) -> Result<usize, usize>
[src]
Executes as a command-line application.
pub fn run_args<S: Into<String>>(self, args: Vec<S>) -> Result<usize, usize>
[src]
Executes as a command-line application.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Command<'a>
impl<'a> !Send for Command<'a>
impl<'a> !Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> !UnwindSafe for Command<'a>
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, 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>,