pub struct Command1<'a, T1: Input> {
pub docs: DocInfo,
pub subcommands: Vec<Box<dyn Cmd + 'a>>,
pub handler: Option<Box<dyn FnMut(&T1) -> CliResult<()> + 'a>>,
pub in1: T1,
}
Fields§
§docs: DocInfo
§subcommands: Vec<Box<dyn Cmd + 'a>>
§handler: Option<Box<dyn FnMut(&T1) -> CliResult<()> + 'a>>
§in1: T1
Implementations§
Trait Implementations§
Source§impl<'a, T1> ParserInfo for Command1<'a, T1>where
T1: Input,
impl<'a, T1> ParserInfo for Command1<'a, T1>where
T1: Input,
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> Freeze for Command1<'a, T1>where
T1: Freeze,
impl<'a, T1> !RefUnwindSafe for Command1<'a, T1>
impl<'a, T1> !Send for Command1<'a, T1>
impl<'a, T1> !Sync for Command1<'a, T1>
impl<'a, T1> Unpin for Command1<'a, T1>where
T1: Unpin,
impl<'a, T1> !UnwindSafe for Command1<'a, T1>
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