natter/src/intermediate/plain_text.rs
Tom Alexander f98a09bc59
Use macros for creating the intermediate stage.
This is to make it easier to change function signatures by consolidating the places where the signatures exist.
2023-10-29 18:46:14 -04:00

16 lines
387 B
Rust

use super::macros::intermediate;
use super::registry::Registry;
use super::util::coalesce_whitespace;
use crate::error::CustomError;
#[derive(Debug, Clone)]
pub(crate) struct IPlainText {
pub(crate) source: String,
}
intermediate!(IPlainText, PlainText, |registry, original| async {
Ok(IPlainText {
source: coalesce_whitespace(original.source).into_owned(),
})
});