Struct needletail::errors::ParseError
source · pub struct ParseError {
pub msg: String,
pub kind: ParseErrorKind,
pub position: ErrorPosition,
pub format: Option<Format>,
}
Expand description
The only error type that needletail returns
Fields§
§msg: String
A description of what went wrong
kind: ParseErrorKind
The type of error that occurred
position: ErrorPosition
Position within file
format: Option<Format>
The format of the file we were parsing
Implementations§
source§impl ParseError
impl ParseError
pub fn new_invalid_start( byte_found: u8, position: ErrorPosition, format: Format ) -> Self
pub fn new_invalid_separator(byte_found: u8, position: ErrorPosition) -> Self
pub fn new_unknown_format(byte_found: u8) -> Self
pub fn new_unequal_length( seq_len: usize, qual_len: usize, position: ErrorPosition ) -> Self
pub fn new_unexpected_end(position: ErrorPosition, format: Format) -> Self
pub fn new_empty_file() -> Self
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<Error> for ParseError
impl From<Error> for ParseError
source§fn from(err: Error) -> ParseError
fn from(err: Error) -> ParseError
Converts to this type from the input type.
source§impl PartialEq<ParseError> for ParseError
impl PartialEq<ParseError> for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.