docx_reader/documents/elements/
character_spacing.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use serde::*;

#[derive(Debug, Clone, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct CharacterSpacing {
	value: i32,
}

impl CharacterSpacing {
	pub fn new(s: i32) -> CharacterSpacing {
		Self { value: s }
	}
}

impl Serialize for CharacterSpacing {
	fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
	where
		S: Serializer,
	{
		serializer.serialize_i32(self.value)
	}
}