docx_reader/documents/elements/
run_property_default.rsuse serde::Serialize;
use super::*;
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RunPropertyDefault {
run_property: RunProperty,
}
impl RunPropertyDefault {
pub fn new() -> RunPropertyDefault {
Default::default()
}
pub fn size(mut self, size: usize) -> Self {
self.run_property = self.run_property.size(size);
self
}
pub fn spacing(mut self, spacing: i32) -> Self {
self.run_property = self.run_property.spacing(spacing);
self
}
pub fn fonts(mut self, font: RunFonts) -> Self {
self.run_property = self.run_property.fonts(font);
self
}
pub(crate) fn run_property(mut self, p: RunProperty) -> Self {
self.run_property = p;
self
}
}
impl Default for RunPropertyDefault {
fn default() -> Self {
let run_property = RunProperty::new();
RunPropertyDefault { run_property }
}
}