pub struct EpubMetadata {Show 15 fields
pub title: String,
pub author: String,
pub language: String,
pub manifest: Vec<ManifestItem>,
pub cover_id: Option<String>,
pub date: Option<String>,
pub publisher: Option<String>,
pub rights: Option<String>,
pub description: Option<String>,
pub subjects: Vec<String>,
pub identifier: Option<String>,
pub modified: Option<String>,
pub rendition_layout: Option<String>,
pub guide: Vec<GuideRef>,
pub opf_path: Option<String>,
}Expand description
EPUB metadata extracted from content.opf
Fields§
§title: StringBook title
Author name
language: StringLanguage code (e.g. “en”)
manifest: Vec<ManifestItem>All resources declared in the manifest
cover_id: Option<String>Manifest ID of the cover image, if any
date: Option<String>Publication date (dc:date)
publisher: Option<String>Publisher (dc:publisher)
rights: Option<String>Rights statement (dc:rights)
description: Option<String>Book description / blurb (dc:description)
subjects: Vec<String>Subject tags (dc:subject) — can have multiple
identifier: Option<String>Unique identifier (dc:identifier) — ISBN, UUID, etc.
modified: Option<String>Last modified date (dcterms:modified)
rendition_layout: Option<String>Rendition layout (e.g. “reflowable”, “pre-paginated”)
guide: Vec<GuideRef>Guide references (EPUB 2.0, deprecated but common)
opf_path: Option<String>Path to the OPF file as specified in container.xml rootfile
Implementations§
Source§impl EpubMetadata
impl EpubMetadata
Sourcepub fn get_item(&self, id: &str) -> Option<&ManifestItem>
pub fn get_item(&self, id: &str) -> Option<&ManifestItem>
Get manifest item by id
Sourcepub fn get_cover_item(&self) -> Option<&ManifestItem>
pub fn get_cover_item(&self) -> Option<&ManifestItem>
Get cover image manifest item
Sourcepub fn find_item_by_href(&self, href: &str) -> Option<&str>
pub fn find_item_by_href(&self, href: &str) -> Option<&str>
Find item ID by href path
Trait Implementations§
Source§impl Clone for EpubMetadata
impl Clone for EpubMetadata
Source§fn clone(&self) -> EpubMetadata
fn clone(&self) -> EpubMetadata
Returns a duplicate of the value. Read more
1.0.0 · 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 EpubMetadata
impl Debug for EpubMetadata
Source§impl Default for EpubMetadata
impl Default for EpubMetadata
Source§impl PartialEq for EpubMetadata
impl PartialEq for EpubMetadata
impl Eq for EpubMetadata
impl StructuralPartialEq for EpubMetadata
Auto Trait Implementations§
impl Freeze for EpubMetadata
impl RefUnwindSafe for EpubMetadata
impl Send for EpubMetadata
impl Sync for EpubMetadata
impl Unpin for EpubMetadata
impl UnsafeUnpin for EpubMetadata
impl UnwindSafe for EpubMetadata
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