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