pub struct Parser<S, C> { /* private fields */ }
Expand description
Parser for Next
.
Trait Implementations§
Source§impl<S: 'static, C: Context<State = S> + 'static, T: Terminal> NamedCommandParser<T> for Parser<S, C>
impl<S: 'static, C: Context<State = S> + 'static, T: Terminal> NamedCommandParser<T> for Parser<S, C>
Source§type Context = C
type Context = C
The application context type. (The part of the application this is not the REPL library.)
Source§type Error = SimulationError<S>
type Error = SimulationError<S>
The type of error that can be produced by the execution of the command.
Source§fn parse(
&self,
s: &str,
) -> Result<Box<dyn Command<T, Context = C, Error = SimulationError<S>>>, ParseCommandError>
fn parse( &self, s: &str, ) -> Result<Box<dyn Command<T, Context = C, Error = SimulationError<S>>>, ParseCommandError>
Source§fn shorthand(&self) -> Option<Cow<'static, str>>
fn shorthand(&self) -> Option<Cow<'static, str>>
Optional shorthand moniker for the command. The user may type in this string instead of the
full command name.
Source§fn name(&self) -> Cow<'static, str>
fn name(&self) -> Cow<'static, str>
The (mandatory) complete name of the command. The user will type in the name of the command,
followed by some (depending on the command) arguments.
Source§fn description(&self) -> Description
fn description(&self) -> Description
Describes the command. The description is displayed when invoking the
help
command.Auto Trait Implementations§
impl<S, C> Freeze for Parser<S, C>
impl<S, C> RefUnwindSafe for Parser<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for Parser<S, C>
impl<S, C> Sync for Parser<S, C>
impl<S, C> Unpin for Parser<S, C>
impl<S, C> UnwindSafe for Parser<S, C>where
S: UnwindSafe,
C: UnwindSafe,
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