use serde::{Serialize, Serializer}; use crate::documents::BuildXML; use crate::xml_builder::*; #[derive(Debug, Clone, PartialEq)] pub struct TableStyle { val: String, } impl TableStyle { pub fn new(val: impl Into) -> TableStyle { TableStyle { val: val.into() } } } impl BuildXML for TableStyle { fn build(&self) -> Vec { let b = XMLBuilder::new(); b.table_style(&self.val).build() } } impl Serialize for TableStyle { fn serialize(&self, serializer: S) -> Result where S: Serializer, { serializer.serialize_str(&self.val) } }