pub enum Error {
MissingDefaultDatabase,
DatabaseConnection {
name: String,
path: String,
},
UnsupportedMacosVersion {
version: String,
error: String,
},
UnsupportedIosVersion {
error: String,
},
InvalidTemplateConfig {
path: String,
},
NonexistentTemplateGroup {
name: String,
},
InvalidTemplate(Error),
JsonSerializationError(Error),
PlistDeserializationError(Error),
YamlDeserializationError(Error),
IoError(Error),
}
Expand description
An enum representing all possible library errors.
Variants§
MissingDefaultDatabase
Error returned when the default Apple Books database cannot be found.
DatabaseConnection
Error returned when there are issues connecting to a database.
Fields
UnsupportedMacosVersion
Error returned when the currently installed version of Apple Books for macOS is unsupported.
This most likely means that the database schema is different than the one the query has been designed for. In that case, the currently installed version of Apple Books is considered unsupported.
Fields
UnsupportedIosVersion
Error returned when the currently installed version of Apple Books for iOS is unsupported.
This most likely means that the plist schema is different than the one used for deserialization. In that case, the currently installed version of Apple Books for iOS is considered unsupported.
InvalidTemplateConfig
Error returned when a syntax error is detected in how a template’s config block is defined. This does not include YAML syntax error.
NonexistentTemplateGroup
Error returned when a requested template-group does not exist.
InvalidTemplate(Error)
Error returned if tera
encounters any errors.
JsonSerializationError(Error)
Error returned if serde_json
encounters any errors during serialization.
PlistDeserializationError(Error)
Error returned if plist
encounters any errors during deserialization.
YamlDeserializationError(Error)
Error returned if serde_yaml
encounters any errors during deserialization.
IoError(Error)
Error returned if any other IO errors are encountered.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
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>
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>
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 more