Compare document category.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use super::macros::ref_getter;
|
||||
use super::macros::simple_getter;
|
||||
use super::Element;
|
||||
use super::GetStandardProperties;
|
||||
use super::Object;
|
||||
@@ -10,6 +11,7 @@ pub type HeadlineLevel = u16;
|
||||
#[derive(Debug)]
|
||||
pub struct Document<'s> {
|
||||
pub(crate) source: &'s str,
|
||||
pub(crate) category: Option<&'s str>,
|
||||
pub(crate) zeroth_section: Option<Section<'s>>,
|
||||
pub(crate) children: Vec<Heading<'s>>,
|
||||
}
|
||||
@@ -73,6 +75,7 @@ impl<'s> StandardProperties<'s> for Heading<'s> {
|
||||
}
|
||||
|
||||
impl<'s> Document<'s> {
|
||||
simple_getter!(get_category, category, Option<&'s str>);
|
||||
ref_getter!(get_zeroth_section, zeroth_section, Option<Section<'s>>);
|
||||
ref_getter!(get_children, children, Vec<Heading<'s>>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user