pub struct ABMacos;
Expand description
A struct for interacting with macOS’s Apple Books databases.
A directory containing macOS’s Apple Books databases should conform to the following structure as this is how the official directory is structured.
[databases]
│
├── AEAnnotation
│ ├── AEAnnotation*.sqlite
│ └── ...
│
├── BKLibrary
│ ├── BKLibrary*.sqlite
│ └── ...
└── ...
Implementations§
Source§impl ABMacos
impl ABMacos
Sourcepub fn extract_books<T>(path: &Path) -> Result<Vec<T>>where
T: ABQuery,
pub fn extract_books<T>(path: &Path) -> Result<Vec<T>>where
T: ABQuery,
Extracts data from the books database and converts them into T
.
§Arguments
path
- The path to a directory containing macOS’s Apple Books databases.
See ABMacos
for more information on how the databases directory should be structured.
§Errors
Will return Err
if:
- The database cannot be found/opened.
- The version of Apple Books is unsupported.
Sourcepub fn extract_annotations<T>(path: &Path) -> Result<Vec<T>>where
T: ABQuery,
pub fn extract_annotations<T>(path: &Path) -> Result<Vec<T>>where
T: ABQuery,
Extracts data from the annotations database and converts them into T
.
§Arguments
path
- The path to a directory containing macOS’s Apple Books databases.
See ABMacos
for more information on how the databases directory should be structured.
§Errors
Will return Err
if:
- The database cannot be found/opened.
- The version of Apple Books is unsupported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ABMacos
impl RefUnwindSafe for ABMacos
impl Send for ABMacos
impl Sync for ABMacos
impl Unpin for ABMacos
impl UnwindSafe for ABMacos
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more