docx_reader/documents/elements/
data_binding.rs

1use serde::Serialize;
2
3#[derive(Serialize, Debug, Clone, PartialEq, Default)]
4pub struct DataBinding {
5	pub xpath: Option<String>,
6	pub prefix_mappings: Option<String>,
7	pub store_item_id: Option<String>,
8}
9
10impl DataBinding {
11	pub fn new() -> Self {
12		Default::default()
13	}
14
15	pub fn xpath(mut self, xpath: impl Into<String>) -> Self {
16		self.xpath = Some(xpath.into());
17		self
18	}
19
20	pub fn prefix_mappings(mut self, m: impl Into<String>) -> Self {
21		self.prefix_mappings = Some(m.into());
22		self
23	}
24
25	pub fn store_item_id(mut self, id: impl Into<String>) -> Self {
26		self.store_item_id = Some(id.into());
27		self
28	}
29}