natter/src/intermediate/table_cell.rs
Tom Alexander 8b85c02ef1
Wrap the intermediate Registry in an IntermediateContext.
This is currently just to maintain consistency with the render phase's RenderContext but in the future it should allow us to include immutable data that is not locked behind the ArcMutex.
2023-12-21 13:53:56 -05:00

28 lines
588 B
Rust

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