docx_reader/documents/elements/
numbering.rsuse super::*;
use serde::Serialize;
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Numbering {
pub id: usize,
pub abstract_num_id: usize,
pub level_overrides: Vec<LevelOverride>,
}
impl Numbering {
pub fn new(id: usize, abstract_num_id: usize) -> Self {
Self {
id,
abstract_num_id,
level_overrides: vec![],
}
}
pub fn overrides(mut self, overrides: Vec<LevelOverride>) -> Self {
self.level_overrides = overrides;
self
}
pub fn add_override(mut self, o: LevelOverride) -> Self {
self.level_overrides.push(o);
self
}
}