22 lines
502 B
Rust
22 lines
502 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.clone(), elem).await?);
|
|
}
|
|
ret
|
|
};
|
|
|
|
Ok(ISection { children })
|
|
});
|