pub struct Command2<'a, T1: Input, T2: Input> {
pub docs: DocInfo,
pub subcommands: Vec<Box<dyn Cmd + 'a>>,
pub handler: Option<Box<dyn FnMut(&T1, &T2) -> CliResult<()> + 'a>>,
pub in1: T1,
pub in2: T2,
}
Fields§
§docs: DocInfo
§subcommands: Vec<Box<dyn Cmd + 'a>>
§handler: Option<Box<dyn FnMut(&T1, &T2) -> CliResult<()> + 'a>>
§in1: T1
§in2: T2
Implementations§
Trait Implementations§
Source§impl<'a, T1, T2> ParserInfo for Command2<'a, T1, T2>
impl<'a, T1, T2> ParserInfo for Command2<'a, T1, T2>
fn docs(&self) -> &DocInfo
fn symbols(&mut self) -> Vec<&mut dyn Input>
fn subcommand_docs(&self) -> Vec<DocInfo>
fn call_handler(&mut self) -> CliResult<()>
fn push_parent(&mut self, parents: &[String])
fn complete_subcommand( &mut self, sub_idx: usize, tokens: &[String], ) -> Result<Vec<CompOut>, CliError>
fn parse_subcommand( &mut self, sub_idx: usize, tokens: &[String], ) -> Result<(), CliError>
Auto Trait Implementations§
impl<'a, T1, T2> Freeze for Command2<'a, T1, T2>
impl<'a, T1, T2> !RefUnwindSafe for Command2<'a, T1, T2>
impl<'a, T1, T2> !Send for Command2<'a, T1, T2>
impl<'a, T1, T2> !Sync for Command2<'a, T1, T2>
impl<'a, T1, T2> Unpin for Command2<'a, T1, T2>
impl<'a, T1, T2> !UnwindSafe for Command2<'a, T1, T2>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more