pub struct Command<'a, T: ?Sized> { /* private fields */ }
Expand description
Define a single-purpose command to be included
in a Commander
Implementations§
Source§impl<'a, T: ?Sized> Command<'a, T>
impl<'a, T: ?Sized> Command<'a, T>
pub fn new(name: impl Into<&'a str>) -> Self
pub fn description(self, desc: impl Into<&'a str>) -> Self
pub fn options( self, opts: impl for<'x, 'y> Fn(App<'x, 'y>) -> App<'x, 'y> + 'a, ) -> Self
pub fn runner( self, run: impl Fn(&T, &ArgMatches<'_>) -> Result<(), Error> + 'a, ) -> Self
Auto Trait Implementations§
impl<'a, T> Freeze for Command<'a, T>where
T: ?Sized,
impl<'a, T> !RefUnwindSafe for Command<'a, T>
impl<'a, T> !Send for Command<'a, T>
impl<'a, T> !Sync for Command<'a, T>
impl<'a, T> Unpin for Command<'a, T>where
T: ?Sized,
impl<'a, T> !UnwindSafe for Command<'a, T>
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