Trait InteractiveHandle
pub trait InteractiveHandle {
// Required methods
fn feed_token(&mut self, token: Token) -> Result<(), ParseError>;
fn accepts(&self) -> Vec<String>;
fn choices(&self) -> BTreeMap<String, ChoiceAction>;
}Expand description
The recovery handle the on-error callback drives — a lifetime-erased view over
the live InteractiveParser (so the callback type carries no engine
lifetime). The callback feeds corrective tokens through this, then returns
true to have the façade retry resume_parse. Provisional surface.
Required Methods§
fn feed_token(&mut self, token: Token) -> Result<(), ParseError>
fn feed_token(&mut self, token: Token) -> Result<(), ParseError>
Feed one corrective token into the live parse (Lark’s
e.interactive_parser.feed_token).
fn choices(&self) -> BTreeMap<String, ChoiceAction>
fn choices(&self) -> BTreeMap<String, ChoiceAction>
The full per-state action map (terminal + goto keys).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".