pub struct Parser { /* private fields */ }Expand description
Command line parser.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn parse(&self, line: &str) -> Result<Command, ParseError>
pub fn parse(&self, line: &str) -> Result<Command, ParseError>
Parse a command line into a Command.
§Errors
Returns ParseError if the command is unknown or arguments are invalid.
Sourcepub fn command_names(&self) -> &'static [&'static str]
pub fn command_names(&self) -> &'static [&'static str]
Get all available command names (for completion).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
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