[−][src]Struct shli::completion::Command
Possible (sub)command displayed in tab completion.
The arguments right from a (sub)command may be flags, arbitrary arguments or even subcommands. They all can be displayed or even tab-completed, when described in this data structure's attributes.
Fields
name: String
args: Vec<Argument>
subcommands: Vec<Command>
Methods
impl Command
[src]
pub fn new(name: &str) -> Command
[src]
Create a new instance by specifying the command's name
pub fn subcommand(self, cmd: Command) -> Command
[src]
Add a subcommand to this command
pub fn arg<T: Into<Argument>>(self, arg: T) -> Command
[src]
Add a concrete argument (e.g. a flag) to this command
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, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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>,