pub struct ParseErrorAt {
pub line: usize,
pub col: usize,
pub span_len: usize,
pub snippet: String,
pub message: String,
}Expand description
A structured parse error with source location and visual context.
Designed to be shown directly to end users (e.g. REST API consumers). Example output:
parse error at 1:5 — expected an operator (==, !=, =in=, ...)
name=bad=value
^Fields§
§line: usize1-based line number.
col: usize1-based column number (byte-based; accurate for ASCII input).
span_len: usizeNumber of characters to underline with ‘^’. At least 1.
snippet: StringThe full source line containing the error.
message: StringHuman-readable description of what went wrong.
Trait Implementations§
Source§impl Clone for ParseErrorAt
impl Clone for ParseErrorAt
Source§fn clone(&self) -> ParseErrorAt
fn clone(&self) -> ParseErrorAt
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 ParseErrorAt
impl Debug for ParseErrorAt
Source§impl Display for ParseErrorAt
impl Display for ParseErrorAt
Source§impl PartialEq for ParseErrorAt
impl PartialEq for ParseErrorAt
Source§fn eq(&self, other: &ParseErrorAt) -> bool
fn eq(&self, other: &ParseErrorAt) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParseErrorAt
Auto Trait Implementations§
impl Freeze for ParseErrorAt
impl RefUnwindSafe for ParseErrorAt
impl Send for ParseErrorAt
impl Sync for ParseErrorAt
impl Unpin for ParseErrorAt
impl UnsafeUnpin for ParseErrorAt
impl UnwindSafe for ParseErrorAt
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