docx_rust/formatting/page_size.rs
1use hard_xml::{XmlRead, XmlWrite};
2
3/// Numbering Id
4///
5/// ```rust
6/// use docx_rust::formatting::*;
7///
8/// let id = NumberingId::from(42isize);
9/// ```
10#[derive(Debug, Default, XmlRead, XmlWrite, Clone)]
11#[cfg_attr(test, derive(PartialEq))]
12#[xml(tag = "w:pgSz")]
13pub struct PageSize {
14 #[xml(attr = "w:w")]
15 pub weight: isize,
16 #[xml(attr = "w:h")]
17 pub height: isize,
18}
19
20// impl<T: Into<isize>> From<T> for NumberingId {
21// fn from(val: T) -> Self {
22// NumberingId { value: val.into() }
23// }
24// }
25
26// __xml_test_suites!(
27// NumberingId,
28// NumberingId::from(40isize),
29// r#"<w:numId w:val="40"/>"#,
30// );