docx_reader/documents/elements/number_format.rs
1use serde::{Serialize, Serializer};
2
3#[derive(Debug, Clone, PartialEq)]
4pub struct NumberFormat {
5 pub val: String,
6}
7
8impl NumberFormat {
9 pub fn new(val: impl Into<String>) -> Self {
10 Self { val: val.into() }
11 }
12}
13
14impl Serialize for NumberFormat {
15 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16 where
17 S: Serializer,
18 {
19 serializer.serialize_str(&self.val)
20 }
21}