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: LexicalErrorTypeThe type of error that occurred.
location: TextSizeThe location of the error.
Implementations§
Source§impl LexicalError
impl LexicalError
Sourcepub fn new(error: LexicalErrorType, location: TextSize) -> Self
pub fn new(error: LexicalErrorType, location: TextSize) -> Self
Creates a new LexicalError with the given error type and location.
Trait Implementations§
Source§impl Debug for LexicalError
impl Debug for LexicalError
Source§impl PartialEq for LexicalError
impl PartialEq for LexicalError
Source§fn eq(&self, other: &LexicalError) -> bool
fn eq(&self, other: &LexicalError) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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