docx_reader/documents/doc_props/custom.rs
use serde::Serialize;
#[derive(Debug, Clone, PartialEq, Serialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct CustomProps {
pub properties: std::collections::HashMap<String, String>,
}
impl CustomProps {
pub(crate) fn new() -> Self {
Self::default()
}
pub fn add_custom_property(mut self, name: impl Into<String>, item: impl Into<String>) -> Self {
self.properties.insert(name.into(), item.into());
self
}
}