32 lines
750 B
Rust
32 lines
750 B
Rust
use super::macros::intermediate;
|
|
use super::IElement;
|
|
use crate::error::CustomError;
|
|
use organic::types::StandardProperties;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct ISection {
|
|
pub(crate) children: Vec<IElement>,
|
|
pub(crate) post_blank: organic::types::PostBlank,
|
|
}
|
|
|
|
intermediate!(
|
|
ISection,
|
|
&'orig organic::types::Section<'parse>,
|
|
original,
|
|
intermediate_context,
|
|
{
|
|
let children = {
|
|
let mut ret = Vec::new();
|
|
for elem in original.children.iter() {
|
|
ret.push(IElement::new(intermediate_context.clone(), elem).await?);
|
|
}
|
|
ret
|
|
};
|
|
|
|
Ok(ISection {
|
|
children,
|
|
post_blank: original.get_post_blank(),
|
|
})
|
|
}
|
|
);
|