Enum LexFailure
pub enum LexFailure {
Build(LexerBuildError),
Lex(ParseError),
}Expand description
What Lark::lex can fail with. Build, lex and parse errors stay separate
categories: Build is the deferred lexer’s construction failure (the
category LarkBuildError::Lexer already maps to lark’s LexError), Lex
is a failure of the lex itself (UnexpectedCharacters, Callback,
Postlex, …).
Variants§
Build(LexerBuildError)
Lex(ParseError)
Trait Implementations§
§impl Clone for LexFailure
impl Clone for LexFailure
§impl Debug for LexFailure
impl Debug for LexFailure
§impl Display for LexFailure
impl Display for LexFailure
impl Eq for LexFailure
§impl Error for LexFailure
impl Error for LexFailure
§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<LexerBuildError> for LexFailure
impl From<LexerBuildError> for LexFailure
§fn from(e: LexerBuildError) -> Self
fn from(e: LexerBuildError) -> Self
Converts to this type from the input type.
§impl From<ParseError> for LexFailure
impl From<ParseError> for LexFailure
§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
§impl PartialEq for LexFailure
impl PartialEq for LexFailure
impl StructuralPartialEq for LexFailure
Auto Trait Implementations§
impl !RefUnwindSafe for LexFailure
impl !UnwindSafe for LexFailure
impl Freeze for LexFailure
impl Send for LexFailure
impl Sync for LexFailure
impl Unpin for LexFailure
impl UnsafeUnpin for LexFailure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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