docx_reader/documents/elements/
table_row_property.rsuse serde::Serialize;
use super::*;
use crate::HeightRule;
#[derive(Debug, Clone, PartialEq, Serialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct TableRowProperty {
grid_after: Option<u32>,
width_after: Option<f32>,
grid_before: Option<u32>,
width_before: Option<f32>,
#[serde(skip_serializing_if = "Option::is_none")]
row_height: Option<f32>,
#[serde(skip_serializing_if = "Option::is_none")]
height_rule: Option<HeightRule>,
#[serde(skip_serializing_if = "Option::is_none")]
pub del: Option<Delete>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ins: Option<Insert>,
}
impl TableRowProperty {
pub fn new() -> TableRowProperty {
Default::default()
}
pub fn grid_after(mut self, after: u32) -> Self {
self.grid_after = Some(after);
self
}
pub fn width_after(mut self, w: f32) -> Self {
self.width_after = Some(w);
self
}
pub fn grid_before(mut self, before: u32) -> Self {
self.grid_before = Some(before);
self
}
pub fn width_before(mut self, w: f32) -> Self {
self.width_before = Some(w);
self
}
pub fn row_height(mut self, h: f32) -> Self {
self.row_height = Some(h);
self
}
pub fn height_rule(mut self, r: HeightRule) -> Self {
self.height_rule = Some(r);
self
}
pub fn delete(mut self, d: Delete) -> Self {
self.del = Some(d);
self
}
pub fn insert(mut self, i: Insert) -> Self {
self.ins = Some(i);
self
}
}