Add intermediate stage for tables.

This commit is contained in:
Tom Alexander
2023-10-31 20:26:34 -04:00
parent ef4d315bf2
commit 386af57ce6
4 changed files with 62 additions and 2 deletions

View File

@@ -1,5 +1,21 @@
use super::macros::inoop;
use super::macros::intermediate;
use super::table_row::ITableRow;
use crate::error::CustomError;
inoop!(ITable, Table);
#[derive(Debug, Clone)]
pub(crate) struct ITable {
pub(crate) children: Vec<ITableRow>,
}
intermediate!(ITable, Table, original, registry, {
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(ITableRow::new(registry.clone(), obj).await?);
}
ret
};
Ok(ITable { children })
});