docx_reader/documents/elements/
fld_char.rs

1use serde::Serialize;
2
3use crate::types::*;
4
5#[derive(Serialize, Debug, Clone, PartialEq)]
6#[serde(rename_all = "camelCase")]
7pub struct FieldChar {
8	pub field_char_type: FieldCharType,
9	pub dirty: bool,
10}
11
12impl FieldChar {
13	pub fn new(t: FieldCharType) -> Self {
14		Self {
15			field_char_type: t,
16			dirty: false,
17		}
18	}
19
20	pub fn dirty(mut self) -> Self {
21		self.dirty = true;
22		self
23	}
24}