pub struct Metadata {
pub title: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub keywords: Option<String>,
pub creator: Option<String>,
pub producer: Option<String>,
pub created: Option<DateTime<Utc>>,
pub modified: Option<DateTime<Utc>>,
pub pdf_version: String,
pub page_count: u32,
pub encrypted: bool,
pub tagged: bool,
}Expand description
Document metadata.
Fields§
§title: Option<String>Document title
Document author
subject: Option<String>Document subject
keywords: Option<String>Keywords
creator: Option<String>Creator application
producer: Option<String>PDF producer
created: Option<DateTime<Utc>>Creation date
modified: Option<DateTime<Utc>>Last modification date
pdf_version: StringPDF version (e.g., “1.7”)
page_count: u32Total number of pages
encrypted: boolWhether the document is encrypted
tagged: boolWhether the document is tagged (accessible)
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn with_version(version: impl Into<String>) -> Self
pub fn with_version(version: impl Into<String>) -> Self
Create new metadata with PDF version.
Sourcepub fn to_yaml_frontmatter(&self) -> String
pub fn to_yaml_frontmatter(&self) -> String
Convert metadata to YAML frontmatter format.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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