docx_reader/documents/
webextension.rsuse serde::Serialize;
#[derive(Serialize, Debug, PartialEq, Clone)]
pub struct WebExtensionProperty {
pub name: String,
pub value: String,
}
impl WebExtensionProperty {
pub fn new(name: impl Into<String>, value: impl Into<String>) -> Self {
Self {
name: name.into(),
value: value.into(),
}
}
}
#[derive(Serialize, Debug, PartialEq, Clone)]
pub struct WebExtension {
pub id: String,
pub version: String,
pub store: String,
pub store_type: String,
pub reference_id: String,
pub properties: Vec<WebExtensionProperty>,
}
impl WebExtension {
pub fn new(
id: impl Into<String>,
reference_id: impl Into<String>,
version: impl Into<String>,
store: impl Into<String>,
store_type: impl Into<String>,
) -> Self {
Self {
id: id.into(),
reference_id: reference_id.into(),
version: version.into(),
store: store.into(),
store_type: store_type.into(),
properties: vec![],
}
}
}