pub struct ParserError { /* private fields */ }
Expand description
A structure representing a parser error.
Implementations§
Trait Implementations§
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the error message associated with the ParserError
.
§Arguments
f
- The formatter to write the output to.
§Examples
use std::error::Error;
use mvt_reader::error::ParserError;
let source_error = std::io::Error::new(std::io::ErrorKind::Other, "Custom error");
let parser_error = ParserError::new(source_error);
println!("{}", parser_error);
Source§impl Error for ParserError
impl Error for ParserError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the underlying source of the ParserError
.
§Examples
use std::error::Error;
use mvt_reader::error::ParserError;
let source_error = std::io::Error::new(std::io::ErrorKind::Other, "Custom error");
let parser_error = ParserError::new(source_error);
let source = parser_error.source();
println!("Source: {}", source.unwrap());
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ParserError
impl !RefUnwindSafe for ParserError
impl !Send for ParserError
impl !Sync for ParserError
impl Unpin for ParserError
impl !UnwindSafe for ParserError
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