use crate::error::CustomError; use super::registry::Registry; use super::IElement; #[derive(Debug)] pub(crate) struct ISection { pub(crate) children: Vec, } impl ISection { pub(crate) fn new<'parse>( registry: &mut Registry<'parse>, section: &organic::types::Section<'parse>, ) -> Result { let children = section .children .iter() .map(|obj| IElement::new(registry, obj)) .collect::, _>>()?; Ok(ISection { children }) } }