mod xml;
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct CoreProperties {
pub(crate) title: String,
pub(crate) author: String,
pub(crate) subject: String,
pub(crate) keywords: String,
pub(crate) comments: String,
pub(crate) category: String,
pub(crate) created: String,
pub(crate) modified: String,
pub(crate) last_modified_by: String,
pub(crate) revision: String,
pub(crate) content_status: String,
pub(crate) language: String,
pub(crate) version: String,
pub(crate) identifier: Option<String>,
pub(crate) last_printed: Option<String>,
}
impl CoreProperties {
#[must_use]
pub fn new() -> Self {
Self::default()
}
#[must_use]
pub fn title(&self) -> &str {
&self.title
}
#[must_use]
pub fn author(&self) -> &str {
&self.author
}
#[must_use]
pub fn subject(&self) -> &str {
&self.subject
}
#[must_use]
pub fn keywords(&self) -> &str {
&self.keywords
}
#[must_use]
pub fn comments(&self) -> &str {
&self.comments
}
#[must_use]
pub fn category(&self) -> &str {
&self.category
}
#[must_use]
pub fn created(&self) -> &str {
&self.created
}
#[must_use]
pub fn modified(&self) -> &str {
&self.modified
}
#[must_use]
pub fn last_modified_by(&self) -> &str {
&self.last_modified_by
}
#[must_use]
pub fn revision(&self) -> &str {
&self.revision
}
#[must_use]
pub fn content_status(&self) -> &str {
&self.content_status
}
#[must_use]
pub fn language(&self) -> &str {
&self.language
}
#[must_use]
pub fn version(&self) -> &str {
&self.version
}
#[must_use]
pub fn identifier(&self) -> Option<&str> {
self.identifier.as_deref()
}
#[must_use]
pub fn last_printed(&self) -> Option<&str> {
self.last_printed.as_deref()
}
pub fn set_title(&mut self, value: impl Into<String>) {
self.title = value.into();
}
pub fn set_author(&mut self, value: impl Into<String>) {
self.author = value.into();
}
pub fn set_subject(&mut self, value: impl Into<String>) {
self.subject = value.into();
}
pub fn set_keywords(&mut self, value: impl Into<String>) {
self.keywords = value.into();
}
pub fn set_comments(&mut self, value: impl Into<String>) {
self.comments = value.into();
}
pub fn set_category(&mut self, value: impl Into<String>) {
self.category = value.into();
}
pub fn set_created(&mut self, value: impl Into<String>) {
self.created = value.into();
}
pub fn set_modified(&mut self, value: impl Into<String>) {
self.modified = value.into();
}
pub fn set_last_modified_by(&mut self, value: impl Into<String>) {
self.last_modified_by = value.into();
}
pub fn set_revision(&mut self, value: impl Into<String>) {
self.revision = value.into();
}
pub fn set_content_status(&mut self, value: impl Into<String>) {
self.content_status = value.into();
}
pub fn set_language(&mut self, value: impl Into<String>) {
self.language = value.into();
}
pub fn set_version(&mut self, value: impl Into<String>) {
self.version = value.into();
}
pub fn set_identifier(&mut self, value: impl Into<String>) {
self.identifier = Some(value.into());
}
pub fn set_last_printed(&mut self, value: impl Into<String>) {
self.last_printed = Some(value.into());
}
}
#[cfg(test)]
mod tests;