pub struct Package { /* private fields */ }Implementations§
Source§impl Package
impl Package
Sourcepub fn open(
storage: Arc<dyn Storage>,
features: Features<'_>,
) -> Result<Package>
pub fn open( storage: Arc<dyn Storage>, features: Features<'_>, ) -> Result<Package>
The package at the root of storage
Sourcepub fn text_format(&self) -> Option<(Format, &str)>
pub fn text_format(&self) -> Option<(Format, &str)>
The format being read, and its folder: none for a package without text logoxide reads (a
book, a collection, a recording of another package’s text). A dictionary’s or
cross-references’ isn’t verse text (Format::is_verse_text)
pub fn manifest(&self) -> &Manifest
pub fn enabled(&self) -> &Enabled
Sourcepub fn into_source(self) -> Box<dyn Source>
pub fn into_source(self) -> Box<dyn Source>
The format being read, keeping nothing else (for apps that hold a source for a session)
pub fn storage(&self) -> &Arc<dyn Storage> ⓘ
pub fn books(&self) -> Vec<BookId>
Auto Trait Implementations§
impl !RefUnwindSafe for Package
impl !UnwindSafe for Package
impl Freeze for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnsafeUnpin for Package
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> 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