pub enum ParseError<HeaderParseError: Error, PayloadParserError: Error> {
FileTooSmall,
Identifier(IdentifierParseError),
IoError(Arc<Error>),
Header(HeaderParseError),
Payload(PayloadParserError),
}Expand description
An error occurred parsing an SF3 file.
Variants§
FileTooSmall
The file was smaller than expected, not enough data to parse.
Identifier(IdentifierParseError)
An error occurred parsing the file Identifier.
IoError(Arc<Error>)
The source could not be read due to an error.
Header(HeaderParseError)
An error occurred parsing the file Header.
Payload(PayloadParserError)
An error occurred parsing the file Payload.
Trait Implementations§
Source§impl<HeaderParseError: Clone + Error, PayloadParserError: Clone + Error> Clone for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError: Clone + Error, PayloadParserError: Clone + Error> Clone for ParseError<HeaderParseError, PayloadParserError>
Source§fn clone(&self) -> ParseError<HeaderParseError, PayloadParserError>
fn clone(&self) -> ParseError<HeaderParseError, PayloadParserError>
Returns a duplicate 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<HeaderParseError: Debug + Error, PayloadParserError: Debug + Error> Debug for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError: Debug + Error, PayloadParserError: Debug + Error> Debug for ParseError<HeaderParseError, PayloadParserError>
Source§impl<T: Error, U: Error> Error for ParseError<T, U>
impl<T: Error, U: Error> Error for ParseError<T, U>
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<T: Error, U: Error> From<IdentifierParseError> for ParseError<T, U>
impl<T: Error, U: Error> From<IdentifierParseError> for ParseError<T, U>
Source§fn from(value: IdentifierParseError) -> Self
fn from(value: IdentifierParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<HeaderParseError, PayloadParserError> Freeze for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError, PayloadParserError> !RefUnwindSafe for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError, PayloadParserError> Send for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError, PayloadParserError> Sync for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError, PayloadParserError> Unpin for ParseError<HeaderParseError, PayloadParserError>
impl<HeaderParseError, PayloadParserError> !UnwindSafe for ParseError<HeaderParseError, PayloadParserError>
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