2023-10-29 17:29:16 -04:00
|
|
|
use super::macros::intermediate;
|
2023-10-29 22:31:29 -04:00
|
|
|
|
2023-10-27 15:46:16 -04:00
|
|
|
use super::IObject;
|
2023-10-29 17:29:16 -04:00
|
|
|
use crate::error::CustomError;
|
2023-10-27 15:46:16 -04:00
|
|
|
|
2023-10-29 15:36:15 -04:00
|
|
|
#[derive(Debug, Clone)]
|
2023-10-27 15:46:16 -04:00
|
|
|
pub(crate) struct IParagraph {
|
|
|
|
pub(crate) children: Vec<IObject>,
|
|
|
|
}
|
|
|
|
|
2023-12-19 17:09:11 -05:00
|
|
|
intermediate!(
|
|
|
|
IParagraph,
|
|
|
|
&'orig organic::types::Paragraph<'parse>,
|
|
|
|
original,
|
|
|
|
registry,
|
|
|
|
{
|
|
|
|
let children = {
|
|
|
|
let mut ret = Vec::new();
|
|
|
|
for obj in original.children.iter() {
|
|
|
|
ret.push(IObject::new(registry.clone(), obj).await?);
|
|
|
|
}
|
|
|
|
ret
|
|
|
|
};
|
2023-10-27 15:46:16 -04:00
|
|
|
|
2023-12-19 17:09:11 -05:00
|
|
|
Ok(IParagraph { children })
|
|
|
|
}
|
|
|
|
);
|