natter/src/intermediate/section.rs
2023-10-29 22:31:29 -04:00

22 lines
472 B
Rust

use super::macros::intermediate;
use super::IElement;
use crate::error::CustomError;
#[derive(Debug, Clone)]
pub(crate) struct ISection {
pub(crate) children: Vec<IElement>,
}
intermediate!(ISection, Section, original, registry, {
let children = {
let mut ret = Vec::new();
for elem in original.children.iter() {
ret.push(IElement::new(registry.clone(), elem).await?);
}
ret
};
Ok(ISection { children })
});