natter/src/context/entity.rs

21 lines
422 B
Rust
Raw Normal View History

2023-10-27 17:48:19 -04:00
use serde::Serialize;
use super::render_context::RenderContext;
2023-10-27 17:48:19 -04:00
use crate::error::CustomError;
use crate::intermediate::IEntity;
use super::macros::render;
2023-10-27 17:48:19 -04:00
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "entity")]
2023-10-27 20:27:50 -04:00
pub(crate) struct RenderEntity {
html: String,
}
2023-10-27 17:48:19 -04:00
render!(RenderEntity, IEntity, original, _render_context, {
Ok(RenderEntity {
html: original.html.clone(),
})
});