pub struct Header {
pub title: String,
pub authors: Vec<Author>,
pub dates: Vec<DateEntry>,
pub identifiers: Vec<Identifier>,
pub version: Option<String>,
pub description: Option<String>,
pub provenance: Option<String>,
pub source: Option<String>,
pub meta: Vec<MetaEntry>,
}Expand description
Document header containing metadata
Fields§
§title: StringDocument title (REQUIRED)
Document authors (0 or more)
dates: Vec<DateEntry>Document dates (created, modified, published, etc.) (0 or more)
identifiers: Vec<Identifier>Document identifiers (0 or more)
version: Option<String>Document version (0 or 1)
description: Option<String>Document description (0 or 1)
provenance: Option<String>Provenance information (0 or 1)
source: Option<String>Source information (0 or 1)
meta: Vec<MetaEntry>Custom metadata entries (0 or more)
Implementations§
Source§impl Header
impl Header
Add an author
Sourcepub fn add_identifier(&mut self, identifier: Identifier)
pub fn add_identifier(&mut self, identifier: Identifier)
Add an identifier
Sourcepub fn with_version(self, version: String) -> Self
pub fn with_version(self, version: String) -> Self
Set version
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Set description
Sourcepub fn with_provenance(self, provenance: String) -> Self
pub fn with_provenance(self, provenance: String) -> Self
Set provenance
Sourcepub fn with_source(self, source: String) -> Self
pub fn with_source(self, source: String) -> Self
Set source
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
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
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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