pub struct Cmd<'a> { /* private fields */ }
Expand description
§Command
§Examples
use std::borrow::Cow;
use dia_args::docs::Cmd;
// All these constants are convenient while working with Args.
// And you can also use them for Cmd.
const CMD_HELP: &str = "help";
const CMD_HELP_DOCS: Cow<str> = Cow::Borrowed("Prints help and exits.");
let _cmd = Cmd::new(CMD_HELP, CMD_HELP_DOCS, None);
// Here you can pass this command to Docs::new(...)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Cmd<'a>
impl<'a> RefUnwindSafe for Cmd<'a>
impl<'a> Send for Cmd<'a>
impl<'a> Sync for Cmd<'a>
impl<'a> Unpin for Cmd<'a>
impl<'a> UnwindSafe for Cmd<'a>
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