pub struct LexicalError {
pub error: LexicalErrorType,
pub location: TextSize,
}
Expand description
Represents an error that occur during lexing and are
returned by the parse_*
functions in the iterator in the
lexer implementation.
Fields§
§error: LexicalErrorType
The type of error that occurred.
location: TextSize
The location of the error.
Implementations§
Source§impl LexicalError
impl LexicalError
Sourcepub fn new(error: LexicalErrorType, location: TextSize) -> LexicalError
pub fn new(error: LexicalErrorType, location: TextSize) -> LexicalError
Creates a new LexicalError
with the given error type and location.
Trait Implementations§
Source§impl Debug for LexicalError
impl Debug for LexicalError
Source§impl From<FStringError> for LexicalError
impl From<FStringError> for LexicalError
Source§fn from(err: FStringError) -> LexicalError
fn from(err: FStringError) -> LexicalError
Converts to this type from the input type.
Source§impl PartialEq for LexicalError
impl PartialEq for LexicalError
impl StructuralPartialEq for LexicalError
Auto Trait Implementations§
impl Freeze for LexicalError
impl RefUnwindSafe for LexicalError
impl Send for LexicalError
impl Sync for LexicalError
impl Unpin for LexicalError
impl UnwindSafe for LexicalError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more