pub struct VttError {
pub looking_for: String,
pub line: u32,
pub offset: usize,
pub fragment: String,
pub message: Option<String>,
}
Fields§
§looking_for: String
What we are looking for
line: u32
Span with error details
offset: usize
§fragment: String
§message: Option<String>
Context-specific message
Trait Implementations§
Source§impl<'a> ContextError<LocatedSpan<&'a str>> for VttError
impl<'a> ContextError<LocatedSpan<&'a str>> for VttError
Source§fn add_context(
input: LocatedSpan<&'a str>,
ctx: &'static str,
other: Self,
) -> Self
fn add_context( input: LocatedSpan<&'a str>, ctx: &'static str, other: Self, ) -> Self
Creates a new error from an input position, a static string and an existing error.
This is used mainly in the context combinator, to add user friendly information
to errors when backtracking through a parse tree
Source§impl<'a> ParseError<LocatedSpan<&'a str>> for VttError
impl<'a> ParseError<LocatedSpan<&'a str>> for VttError
Source§fn from_error_kind(input: LocatedSpan<&'a str>, kind: ErrorKind) -> Self
fn from_error_kind(input: LocatedSpan<&'a str>, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(input: LocatedSpan<&'a str>, kind: ErrorKind, _other: Self) -> Self
fn append(input: LocatedSpan<&'a str>, kind: ErrorKind, _other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
Auto Trait Implementations§
impl Freeze for VttError
impl RefUnwindSafe for VttError
impl Send for VttError
impl Sync for VttError
impl Unpin for VttError
impl UnwindSafe for VttError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)