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

22 lines
494 B
Rust

use super::macros::intermediate;
use super::registry::Registry;
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, elem).await?);
}
ret
};
Ok(ISection { children })
});