#[non_exhaustive]pub struct TokenSourceError {
pub line: usize,
pub column: usize,
pub span: Option<Range<usize>>,
pub message: String,
}Expand description
A diagnostic buffered by a token source while it was producing tokens.
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.line: usizeOne-based input line where the diagnostic starts.
column: usizeZero-based column within line where the diagnostic starts.
span: Option<Range<usize>>Half-open UTF-8 byte span of the offending input, when available.
message: StringANTLR-compatible diagnostic message without the leading line/column.
Implementations§
Trait Implementations§
Source§impl Clone for TokenSourceError
impl Clone for TokenSourceError
Source§fn clone(&self) -> TokenSourceError
fn clone(&self) -> TokenSourceError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenSourceError
impl Debug for TokenSourceError
impl Eq for TokenSourceError
Source§impl<'a> From<&'a TokenSourceError> for SyntaxErrorEvent<'a>
impl<'a> From<&'a TokenSourceError> for SyntaxErrorEvent<'a>
Source§fn from(error: &'a TokenSourceError) -> Self
fn from(error: &'a TokenSourceError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TokenSourceError
impl PartialEq for TokenSourceError
impl StructuralPartialEq for TokenSourceError
Auto Trait Implementations§
impl Freeze for TokenSourceError
impl RefUnwindSafe for TokenSourceError
impl Send for TokenSourceError
impl Sync for TokenSourceError
impl Unpin for TokenSourceError
impl UnsafeUnpin for TokenSourceError
impl UnwindSafe for TokenSourceError
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