pub struct PdfMetadata {
pub title: Option<String>,
pub author: Option<String>,
pub language: Option<String>,
}Expand description
Document-level metadata that gets written to the PDF Info
dictionary. Populated by the lowerer from #set document(...).
The language field is captured but not yet emitted (it belongs in
the catalog /Lang entry, which is the next slice).
§Examples
use mos_pdf::PdfMetadata;
let metadata = PdfMetadata {
title: Some("Demo".to_owned()),
author: Some("Mosaic".to_owned()),
language: Some("en".to_owned()),
};
assert_eq!(metadata.title.as_deref(), Some("Demo"));Fields§
§title: Option<String>§language: Option<String>Trait Implementations§
Source§impl Clone for PdfMetadata
impl Clone for PdfMetadata
Source§fn clone(&self) -> PdfMetadata
fn clone(&self) -> PdfMetadata
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 PdfMetadata
impl Debug for PdfMetadata
Source§impl Default for PdfMetadata
impl Default for PdfMetadata
Source§fn default() -> PdfMetadata
fn default() -> PdfMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PdfMetadata
impl RefUnwindSafe for PdfMetadata
impl Send for PdfMetadata
impl Sync for PdfMetadata
impl Unpin for PdfMetadata
impl UnsafeUnpin for PdfMetadata
impl UnwindSafe for PdfMetadata
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,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.