pub struct Error<'a> {
pub input: &'a str,
pub context: Option<Context>,
/* private fields */
}
Expand description
.hltas
parsing error.
Fields§
§input: &'a str
Remaining input at the point of failure.
context: Option<Context>
Semantic meaning of the parsing error.
Implementations§
Trait Implementations§
source§impl Error for Error<'_>
impl Error for Error<'_>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'a, E> FromExternalError<&'a str, E> for Error<'a>
impl<'a, E> FromExternalError<&'a str, E> for Error<'a>
source§impl<'a> ParseError<&'a str> for Error<'a>
impl<'a> ParseError<&'a str> for Error<'a>
source§fn from_error_kind(input: &'a str, kind: ErrorKind) -> Self
fn from_error_kind(input: &'a str, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(_input: &'a str, _kind: ErrorKind, other: Self) -> Self
fn append(_input: &'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
source§impl<'a> PartialEq<Error<'a>> for Error<'a>
impl<'a> PartialEq<Error<'a>> for Error<'a>
impl<'a> Copy for Error<'a>
impl<'a> Eq for Error<'a>
impl<'a> StructuralEq for Error<'a>
impl<'a> StructuralPartialEq for Error<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Error<'a>
impl<'a> Send for Error<'a>
impl<'a> Sync for Error<'a>
impl<'a> Unpin for Error<'a>
impl<'a> UnwindSafe for Error<'a>
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