docx_reader/documents/elements/level_restart.rs
use serde::{Serialize, Serializer};
#[derive(Debug, Clone, PartialEq)]
pub struct LevelRestart {
val: u32,
}
impl LevelRestart {
pub fn new(val: impl Into<u32>) -> Self {
Self { val: val.into() }
}
}
impl Serialize for LevelRestart {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_u32(self.val)
}
}