docx_reader/documents/elements/
level_override.rsuse super::*;
use serde::Serialize;
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct LevelOverride {
pub level: usize,
pub override_start: Option<usize>,
pub override_level: Option<Level>,
}
impl LevelOverride {
pub fn new(level: usize) -> LevelOverride {
LevelOverride {
level,
override_start: None,
override_level: None,
}
}
pub fn start(mut self, start: usize) -> LevelOverride {
self.override_start = Some(start);
self
}
pub fn level(mut self, override_level: Level) -> LevelOverride {
self.override_level = Some(override_level);
self
}
}