Struct sequent_repl::commands::event_proxy::Parser
source · pub struct Parser<S, E: Event<S>> { /* private fields */ }Expand description
Parser for EventProxy of some event type.
Implementations§
source§impl<S, E> Parser<S, E>where
E: Event<S> + FromStr + StaticNamed,
impl<S, E> Parser<S, E>where
E: Event<S> + FromStr + StaticNamed,
sourcepub fn new(
shorthand: Option<Cow<'static, str>>,
description: Description
) -> Self
pub fn new(
shorthand: Option<Cow<'static, str>>,
description: Description
) -> Self
Creates a new parser. The name is taken from the event type, provided the latter implements
StaticNamed.
Trait Implementations§
source§impl<S: 'static, C: Context<S>, E, T: Terminal> NamedCommandParser<C, SimulationError<S>, T> for Parser<S, E>where
E: FromStr + Event<S> + 'static,
E::Err: ToString,
impl<S: 'static, C: Context<S>, E, T: Terminal> NamedCommandParser<C, SimulationError<S>, T> for Parser<S, E>where
E: FromStr + Event<S> + 'static,
E::Err: ToString,
source§fn parse(
&self,
s: &str
) -> Result<Box<dyn Command<C, SimulationError<S>, T>>, ParseCommandError>
fn parse(
&self,
s: &str
) -> Result<Box<dyn Command<C, SimulationError<S>, T>>, 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. Read more
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. Read more
source§fn description(&self) -> Description
fn description(&self) -> Description
Describes the command. The description is displayed when invoking the
help command.