pub struct SyntaxError<'a> {
pub input: &'a str,
pub underlying: VerboseError<&'a str>,
}Expand description
A parsing syntax error.
This is an opaque error type that wraps an underlying syntax error. The format and level of
detail of the error output depends on the verbose-errors feature.
Fields§
§input: &'a strThe parser input that caused the error.
underlying: VerboseError<&'a str>The underlying nom error.
Trait Implementations§
Source§impl<'a> Debug for SyntaxError<'a>
impl<'a> Debug for SyntaxError<'a>
Source§impl<'a> Display for SyntaxError<'a>
impl<'a> Display for SyntaxError<'a>
Source§impl<'a> Error for SyntaxError<'a>
Available on crate feature std only.
impl<'a> Error for SyntaxError<'a>
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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> From<SyntaxError<'a>> for BufParseError<'a>
impl<'a> From<SyntaxError<'a>> for BufParseError<'a>
Source§fn from(err: SyntaxError<'a>) -> Self
fn from(err: SyntaxError<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SyntaxError<'a>
impl<'a> RefUnwindSafe for SyntaxError<'a>
impl<'a> Send for SyntaxError<'a>
impl<'a> Sync for SyntaxError<'a>
impl<'a> Unpin for SyntaxError<'a>
impl<'a> UnwindSafe for SyntaxError<'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