pub struct CmdBuilder { /* private fields */ }Expand description
A builder for a command
This struct is created by cmd::add, and when it is
dropped, the command gets added.
Implementations§
Source§impl CmdBuilder
impl CmdBuilder
Sourcepub fn doc_param(
self,
short: Text,
long: Option<Text>,
name: Option<Text>,
) -> Self
pub fn doc_param( self, short: Text, long: Option<Text>, name: Option<Text>, ) -> Self
Adds documentation for the next Parameter of the
command
You have to give a short description, and you may give a long description and a name.
The short and long descriptions should not present the same information, the long description merely adds additional context.
The name argument will rename the argument to something
else. If it is excluded, then the default name (provided
by Parameter::arg_name will be used.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CmdBuilder
impl !RefUnwindSafe for CmdBuilder
impl Send for CmdBuilder
impl Sync for CmdBuilder
impl Unpin for CmdBuilder
impl UnsafeUnpin for CmdBuilder
impl !UnwindSafe for CmdBuilder
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