Struct ParseFailure
#[non_exhaustive]pub struct ParseFailure {
pub error: ParseError,
pub interactive_parser: Option<Box<OwnedInteractiveParser>>,
}Expand description
A failed Lark::parse, Lark::parse_opts or Lark::parse_with_hook:
the error, and the interactive parser the parse left (Lark’s
e.interactive_parser), where one exists. Boxed, so a successful parse’s
Result stays small.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: ParseError§interactive_parser: Option<Box<OwnedInteractiveParser>>Trait Implementations§
§impl Debug for ParseFailure
impl Debug for ParseFailure
§impl Display for ParseFailure
impl Display for ParseFailure
§impl Error for ParseFailure
impl Error for ParseFailure
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<ParseError> for ParseFailure
A failure that kept no parser.
impl From<ParseError> for ParseFailure
A failure that kept no parser.
§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
§impl From<ParseFailure> for ParseError
The error alone, dropping any parser it kept.
impl From<ParseFailure> for ParseError
The error alone, dropping any parser it kept.
§fn from(failure: ParseFailure) -> Self
fn from(failure: ParseFailure) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ParseFailure
impl !UnwindSafe for ParseFailure
impl Freeze for ParseFailure
impl Send for ParseFailure
impl Sync for ParseFailure
impl Unpin for ParseFailure
impl UnsafeUnpin for ParseFailure
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
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more