pub enum EbookError {
Io(String),
Xml(String),
Zip(String),
DrmProtected(String),
InvalidFormat(String),
CorruptedData(String),
NotFound(String),
Custom(String),
}Expand description
Strongly-typed error enum for ebook-rs operations and multi-format parsers.
Variants§
Io(String)
File or stream input/output error.
Xml(String)
XML or HTML structural parsing error.
Zip(String)
Zip or container archive extraction error.
DrmProtected(String)
Digital Rights Management (DRM / ADEPT / LCP / Mobipocket) restriction.
InvalidFormat(String)
Unsupported or invalid eBook format specifications.
CorruptedData(String)
Data integrity or corrupted file record.
NotFound(String)
Missing file, entry, or resource within an eBook archive.
Custom(String)
General or custom operation error message.
Trait Implementations§
Source§impl Clone for EbookError
impl Clone for EbookError
Source§fn clone(&self) -> EbookError
fn clone(&self) -> EbookError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EbookError
impl Debug for EbookError
Source§impl Display for EbookError
impl Display for EbookError
impl Eq for EbookError
Source§impl Error for EbookError
impl Error for EbookError
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 From<&str> for EbookError
impl From<&str> for EbookError
Source§impl From<EbookError> for String
impl From<EbookError> for String
Source§fn from(err: EbookError) -> Self
fn from(err: EbookError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for EbookError
impl From<Error> for EbookError
Source§impl From<String> for EbookError
impl From<String> for EbookError
Source§impl PartialEq for EbookError
impl PartialEq for EbookError
impl StructuralPartialEq for EbookError
Auto Trait Implementations§
impl Freeze for EbookError
impl RefUnwindSafe for EbookError
impl Send for EbookError
impl Sync for EbookError
impl Unpin for EbookError
impl UnsafeUnpin for EbookError
impl UnwindSafe for EbookError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more