26 lines
627 B
Rust
26 lines
627 B
Rust
use super::macros::intermediate;
|
|
use super::registry::Registry;
|
|
use super::IPlainListItem;
|
|
use crate::error::CustomError;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct IPlainList {
|
|
pub(crate) list_type: organic::types::PlainListType,
|
|
pub(crate) children: Vec<IPlainListItem>,
|
|
}
|
|
|
|
intermediate!(IPlainList, PlainList, original, registry, {
|
|
let children = {
|
|
let mut ret = Vec::new();
|
|
for obj in original.children.iter() {
|
|
ret.push(IPlainListItem::new(registry, obj).await?);
|
|
}
|
|
ret
|
|
};
|
|
|
|
Ok(IPlainList {
|
|
list_type: original.list_type,
|
|
children,
|
|
})
|
|
});
|