docx_reader/documents/elements/
bold_cs.rs

1use serde::{Deserialize, Serialize, Serializer};
2
3#[derive(Debug, Clone, Deserialize, PartialEq)]
4pub struct BoldCs {
5	val: bool,
6}
7
8impl BoldCs {
9	pub fn new() -> BoldCs {
10		Default::default()
11	}
12	pub fn disable(mut self) -> BoldCs {
13		self.val = false;
14		self
15	}
16}
17
18impl Default for BoldCs {
19	fn default() -> Self {
20		Self { val: true }
21	}
22}
23
24impl Serialize for BoldCs {
25	fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26	where
27		S: Serializer,
28	{
29		serializer.serialize_bool(self.val)
30	}
31}