natter/src/intermediate/plain_list.rs
fluxcdbot b3929f22f3
Some checks failed
clippy Build clippy has failed
format Build format has succeeded
rust-test Build rust-test has failed
build Build build has succeeded
CI: autofix rust code.
2025-08-31 22:24:16 +00:00

34 lines
874 B
Rust

use super::IPlainListItem;
use super::macros::intermediate;
use crate::error::CustomError;
use organic::types::StandardProperties;
#[derive(Debug, Clone)]
pub(crate) struct IPlainList {
pub(crate) list_type: organic::types::PlainListType,
pub(crate) children: Vec<IPlainListItem>,
pub(crate) post_blank: organic::types::PostBlank,
}
intermediate!(
IPlainList,
&'orig organic::types::PlainList<'parse>,
original,
intermediate_context,
{
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(IPlainListItem::new(intermediate_context.clone(), obj).await?);
}
ret
};
Ok(IPlainList {
list_type: original.list_type,
children,
post_blank: original.get_post_blank(),
})
}
);