natter/src/context/plain_text.rs

28 lines
590 B
Rust
Raw Normal View History

2023-10-27 13:01:45 -04:00
use std::path::Path;
use serde::Serialize;
use crate::config::Config;
use crate::error::CustomError;
use crate::intermediate::IPlainText;
2023-10-27 13:01:45 -04:00
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
2023-10-27 16:09:44 -04:00
#[serde(rename = "plain_text")]
2023-10-27 19:42:33 -04:00
pub(crate) struct RenderPlainText {
source: String,
}
2023-10-27 13:01:45 -04:00
impl RenderPlainText {
2023-10-27 18:59:40 -04:00
pub(crate) fn new(
2023-10-29 22:31:29 -04:00
_config: &Config,
_output_directory: &Path,
_output_file: &Path,
2023-10-27 19:42:33 -04:00
original: &IPlainText,
2023-10-27 13:01:45 -04:00
) -> Result<RenderPlainText, CustomError> {
2023-10-27 19:42:33 -04:00
Ok(RenderPlainText {
source: original.source.clone(),
})
2023-10-27 13:01:45 -04:00
}
}