#[non_exhaustive]pub struct ParseError {
pub message: String,
pub byte_offset: Option<usize>,
pub line: Option<u32>,
pub column: Option<u32>,
}Expand description
Details of a parse failure, projected from the C ABI’s FigError.
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.message: StringA human-readable message. Currently the core’s error name (e.g.
"UnclosedObject"); a richer message may follow in a later release.
byte_offset: Option<usize>Byte offset of the failure within the input, when known. None means
unknown — the core does not yet surface offsets, so this is None in the
current release (the field is wired for when it does).
line: Option<u32>1-based line of the failure, when known (see byte_offset).
column: Option<u32>1-based column of the failure, when known (see byte_offset).
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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