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