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