pub struct CliSpec { /* private fields */ }Implementations§
Source§impl CliSpec
impl CliSpec
pub fn new(name: impl Into<String>) -> Self
pub fn about(self, about: impl Into<String>) -> Self
pub fn version(self, version: impl Into<String>) -> Self
pub fn command(self, command: CommandSpec) -> Self
pub fn option(self, option: OptionSpec) -> Self
pub fn argument(self, argument: ArgumentSpec) -> Self
pub fn command_required(self, required: bool) -> Self
pub fn validate(&self) -> Result<(), SpecError>
pub fn name(&self) -> &str
pub fn about_text(&self) -> &str
pub fn version_text(&self) -> Option<&str>
pub fn commands(&self) -> &[CommandSpec]
pub fn options(&self) -> &[OptionSpec]
pub fn arguments(&self) -> &[ArgumentSpec]
pub fn is_command_required(&self) -> bool
Trait Implementations§
impl Eq for CliSpec
impl StructuralPartialEq for CliSpec
Auto Trait Implementations§
impl Freeze for CliSpec
impl RefUnwindSafe for CliSpec
impl Send for CliSpec
impl Sync for CliSpec
impl Unpin for CliSpec
impl UnsafeUnpin for CliSpec
impl UnwindSafe for CliSpec
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