diff --git a/src/types/document.rs b/src/types/document.rs index c8001e5..974d77b 100644 --- a/src/types/document.rs +++ b/src/types/document.rs @@ -1,3 +1,4 @@ +use super::macros::ref_getter; use super::Element; use super::GetStandardProperties; use super::Object; @@ -8,9 +9,9 @@ pub type HeadlineLevel = u16; #[derive(Debug)] pub struct Document<'s> { - pub source: &'s str, - pub zeroth_section: Option>, - pub children: Vec>, + pub(crate) source: &'s str, + pub(crate) zeroth_section: Option>, + pub(crate) children: Vec>, } #[derive(Debug)] @@ -70,3 +71,8 @@ impl<'s> StandardProperties<'s> for Heading<'s> { self.source } } + +impl<'s> Document<'s> { + ref_getter!(get_zeroth_section, zeroth_section, Option>); + ref_getter!(get_children, children, Vec>); +}