pub enum Found {
Text(Cow<'static, str>),
EndOfInput,
}Expand description
What the parser actually encountered at the error site.
End-of-input is a distinct, common case that has no source text to quote, so it is a variant of its own rather than a magic string — this keeps both the rendered message (“found end of input”) and any future programmatic handling honest.
Variants§
Text(Cow<'static, str>)
A concrete piece of source text (a lexeme or a description of one).
EndOfInput
The parser reached the end of the input.
Trait Implementations§
impl Eq for Found
impl StructuralPartialEq for Found
Auto Trait Implementations§
impl Freeze for Found
impl RefUnwindSafe for Found
impl Send for Found
impl Sync for Found
impl Unpin for Found
impl UnsafeUnpin for Found
impl UnwindSafe for Found
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