pub struct Metadata {
pub title: Option<String>,
pub author: Option<String>,
pub publisher: Option<String>,
pub language: Option<String>,
pub identifier: Option<String>,
pub date: Option<String>,
pub rights: Option<String>,
}Expand description
Dublin Core metadata extracted from an EPUB file.
This struct contains standard Dublin Core metadata fields as defined in the EPUB specification. All fields are optional as not all EPUBs contain complete metadata.
§Example
use epub_parser::Metadata;
let metadata = Metadata {
title: Some("Example Book".to_string()),
author: Some("John Doe".to_string()),
publisher: Some("Example Press".to_string()),
language: Some("en".to_string()),
..Default::default()
};
println!("Book: {}", metadata.title.unwrap_or_default());Fields§
§title: Option<String>The title of the book.
Maps to the Dublin Core dc:title element.
The author or creator of the book.
Maps to the Dublin Core dc:creator element.
publisher: Option<String>The publisher of the book.
Maps to the Dublin Core dc:publisher element.
language: Option<String>The language code (e.g., “en”, “fr”, “zh”).
Maps to the Dublin Core dc:language element.
identifier: Option<String>A unique identifier for the book (e.g., ISBN, UUID).
Maps to the Dublin Core dc:identifier element.
date: Option<String>The publication date.
Maps to the Dublin Core dc:date element.
Typically in YYYY-MM-DD format.
rights: Option<String>The copyright or rights statement.
Maps to the Dublin Core dc:rights element.