
This is largely to make changing the type signature of these functions easier by significantly reducing the amount of places that duplicates the signature.
31 lines
522 B
Rust
31 lines
522 B
Rust
use std::path::Path;
|
|
|
|
use serde::Serialize;
|
|
|
|
use crate::config::Config;
|
|
use crate::error::CustomError;
|
|
use crate::intermediate::IPlainText;
|
|
|
|
use super::macros::render;
|
|
|
|
#[derive(Debug, Serialize)]
|
|
#[serde(tag = "type")]
|
|
#[serde(rename = "plain_text")]
|
|
pub(crate) struct RenderPlainText {
|
|
source: String,
|
|
}
|
|
|
|
render!(
|
|
RenderPlainText,
|
|
IPlainText,
|
|
original,
|
|
config,
|
|
output_directory,
|
|
output_file,
|
|
{
|
|
Ok(RenderPlainText {
|
|
source: original.source.clone(),
|
|
})
|
|
}
|
|
);
|