natter/src/context/entity.rs
2023-10-27 20:27:50 -04:00

28 lines
555 B
Rust

use std::path::Path;
use serde::Serialize;
use crate::config::Config;
use crate::error::CustomError;
use crate::intermediate::IEntity;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "entity")]
pub(crate) struct RenderEntity {
html: String,
}
impl RenderEntity {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
entity: &IEntity,
) -> Result<RenderEntity, CustomError> {
Ok(RenderEntity {
html: entity.html.clone(),
})
}
}