#[non_exhaustive]pub enum FormatError {
Unparsable(Box<dyn Error + Send + Sync + 'static>),
InvalidUtf8(FromUtf8Error),
Epub(EpubFormatError),
}Expand description
Possible format errors for an Ebook.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unparsable(Box<dyn Error + Send + Sync + 'static>)
Ebook file content unexpectedly causes an internal parser error.
This may originate from malformed content within a file, such as improper XML.
InvalidUtf8(FromUtf8Error)
Ebook file contents do not conform to valid UTF-8.
Epub(EpubFormatError)
Format errors specific to an Epub.
Trait Implementations§
Source§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
Source§impl Error for FormatError
impl Error for FormatError
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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<EncodingError> for FormatError
impl From<EncodingError> for FormatError
Source§fn from(error: EncodingError) -> Self
fn from(error: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EpubFormatError> for FormatError
impl From<EpubFormatError> for FormatError
Source§fn from(source: EpubFormatError) -> Self
fn from(source: EpubFormatError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for FormatError
impl From<Error> for FormatError
Source§impl From<FormatError> for EbookError
impl From<FormatError> for EbookError
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Source§impl From<FormatError> for ReaderError
impl From<FormatError> for ReaderError
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for FormatError
impl From<FromUtf8Error> for FormatError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FormatError
impl !RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl !UnwindSafe for FormatError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more