Struct diskplan_schema::ParseError
source · pub struct ParseError<'a> { /* private fields */ }
Expand description
A detailed error for an issue encountered during parsing
Implementations§
source§impl<'a> ParseError<'a>
impl<'a> ParseError<'a>
sourcepub fn new(
error: String,
text: &'a str,
span: &'a str,
next: Option<Box<ParseError<'a>>>
) -> ParseError<'a>
pub fn new( error: String, text: &'a str, span: &'a str, next: Option<Box<ParseError<'a>>> ) -> ParseError<'a>
Constructs a detailed error for an issue encountered during parsing
sourcepub fn line_number(&self) -> usize
pub fn line_number(&self) -> usize
Returns the calculated line number of the span within the text
Trait Implementations§
source§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
source§impl Display for ParseError<'_>
impl Display for ParseError<'_>
source§impl Error for ParseError<'_>
impl Error for ParseError<'_>
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, 'b> IntoIterator for &'b ParseError<'a>
impl<'a, 'b> IntoIterator for &'b ParseError<'a>
source§impl<'a> PartialEq for ParseError<'a>
impl<'a> PartialEq for ParseError<'a>
source§fn eq(&self, other: &ParseError<'a>) -> bool
fn eq(&self, other: &ParseError<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> StructuralPartialEq for ParseError<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> Send for ParseError<'a>
impl<'a> Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'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