natter/src/intermediate/quote_block.rs

22 lines
504 B
Rust
Raw Normal View History

use super::macros::intermediate;
2023-10-27 17:08:58 -04:00
use super::registry::Registry;
2023-10-27 19:53:18 -04:00
use super::IElement;
use crate::error::CustomError;
2023-10-27 17:08:58 -04:00
2023-10-29 15:36:15 -04:00
#[derive(Debug, Clone)]
2023-10-27 19:53:18 -04:00
pub(crate) struct IQuoteBlock {
pub(crate) children: Vec<IElement>,
}
2023-10-27 17:08:58 -04:00
intermediate!(IQuoteBlock, QuoteBlock, original, registry, {
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(IElement::new(registry, obj).await?);
}
ret
};
2023-10-27 19:53:18 -04:00
Ok(IQuoteBlock { children })
});