Struct OnErrorContext
pub struct OnErrorContext<'a> { /* private fields */ }Expand description
The context handed to a parse(on_error=) callback: the escaping error plus a
mutable recovery handle onto the live parse.
Implementations§
§impl OnErrorContext<'_>
impl OnErrorContext<'_>
pub fn error(&self) -> &ParseError
pub fn error(&self) -> &ParseError
The UnexpectedInput that stalled the parse.
pub fn interactive_parser(&mut self) -> &mut dyn InteractiveHandle
pub fn interactive_parser(&mut self) -> &mut dyn InteractiveHandle
The recovery handle — feed corrective tokens before returning true.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OnErrorContext<'a>
impl<'a> !Send for OnErrorContext<'a>
impl<'a> !Sync for OnErrorContext<'a>
impl<'a> !UnwindSafe for OnErrorContext<'a>
impl<'a> Freeze for OnErrorContext<'a>
impl<'a> Unpin for OnErrorContext<'a>
impl<'a> UnsafeUnpin for OnErrorContext<'a>
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