use serde::Serialize; use crate::error::CustomError; use crate::intermediate::IBold; use super::macros::render; use super::render_context::RenderContext; use super::RenderObject; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "bold")] pub(crate) struct RenderBold { children: Vec, post_blank: organic::types::PostBlank, } render!(RenderBold, IBold, original, render_context, { let children = { let mut ret = Vec::new(); for obj in original.children.iter() { ret.push(RenderObject::new(render_context.clone(), obj)?); } ret }; Ok(RenderBold { children, post_blank: original.post_blank, }) });