docx_reader/documents/elements/
br.rsuse serde::ser::{Serialize, SerializeStruct, Serializer};
use serde::Deserialize;
use crate::types::*;
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct Break {
break_type: BreakType,
}
impl Break {
pub fn new(t: BreakType) -> Break {
Break { break_type: t }
}
}
impl Serialize for Break {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut t = serializer.serialize_struct("Break", 1)?;
t.serialize_field("breakType", &format!("{}", &self.break_type))?;
t.end()
}
}