28 lines
565 B
Rust
28 lines
565 B
Rust
use super::macros::intermediate;
|
|
|
|
use super::table_row::ITableRow;
|
|
use crate::error::CustomError;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct ITable {
|
|
pub(crate) children: Vec<ITableRow>,
|
|
}
|
|
|
|
intermediate!(
|
|
ITable,
|
|
&'orig organic::types::Table<'parse>,
|
|
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 })
|
|
}
|
|
);
|