Type Alias cli_rs::command::Command

source ·
pub type Command<'a> = Command0<'a>;

Aliased Type§

struct Command<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Command0<'a>

source

pub fn name(name: &str) -> Self

source

pub fn with_completions(self) -> Self

source

pub fn description(self, description: &str) -> Self

source

pub fn input<T: Input>(self, input: T) -> Command1<'a, T>

source

pub fn handler<F>(self, handler: F) -> Selfwhere F: FnMut() -> CliResult<()> + 'a,

source

pub fn subcommand<C: Cmd + 'a>(self, sub: C) -> Self

Trait Implementations§

source§

impl<'a> ParserInfo for Command0<'a>

source§

fn symbols(&mut self) -> Vec<&mut dyn Input>

source§

fn call_handler(&mut self) -> CliResult<()>

source§

fn subcommand_docs(&self) -> Vec<DocInfo>

source§

fn docs(&self) -> &DocInfo

source§

fn push_parent(&mut self, parents: &[String])

source§

fn parse_subcommand( &mut self, sub_idx: usize, tokens: &[String] ) -> Result<(), CliError>

source§

fn complete_subcommand( &mut self, sub_idx: usize, tokens: &[String] ) -> Result<(), CliError>