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) async fn new<'parse>( registry: &mut Registry<'parse>, section: &organic::types::Section<'parse>, ) -> Result { let children = { let mut ret = Vec::new(); for elem in section.children.iter() { ret.push(IElement::new(registry, elem).await?); } ret }; Ok(ISection { children }) } }