pub struct DocumentMetadata {
pub title: Option<String>,
pub author: Option<String>,
pub language: Option<String>,
}Expand description
Document-level metadata harvested from #set document(...) directives.
The PDF backend writes title and author to the Info dictionary;
language is captured for the catalog /Lang entry that the next
PDF-metadata slice will wire up.
§Examples
use mos_eval::DocumentMetadata;
let metadata = DocumentMetadata {
title: Some("Demo".to_owned()),
author: None,
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 DocumentMetadata
impl Clone for DocumentMetadata
Source§fn clone(&self) -> DocumentMetadata
fn clone(&self) -> DocumentMetadata
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 DocumentMetadata
impl Debug for DocumentMetadata
Source§impl Default for DocumentMetadata
impl Default for DocumentMetadata
Source§fn default() -> DocumentMetadata
fn default() -> DocumentMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for DocumentMetadata
impl PartialEq for DocumentMetadata
impl Eq for DocumentMetadata
impl StructuralPartialEq for DocumentMetadata
Auto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnsafeUnpin for DocumentMetadata
impl UnwindSafe for DocumentMetadata
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