2023-10-22 16:40:58 -04:00
|
|
|
use serde::Serialize;
|
|
|
|
|
|
2023-10-22 16:26:43 -04:00
|
|
|
use crate::error::CustomError;
|
|
|
|
|
|
2023-10-22 17:43:30 -04:00
|
|
|
pub(crate) trait RendererIntegration<'a> {
|
|
|
|
|
fn load_template(&mut self, name: &'a str, contents: &'a str) -> Result<(), CustomError>;
|
2023-10-22 16:26:43 -04:00
|
|
|
|
2023-10-22 17:37:27 -04:00
|
|
|
fn render<C>(&self, context: C) -> Result<String, CustomError>
|
2023-10-22 16:26:43 -04:00
|
|
|
where
|
2023-10-22 16:40:58 -04:00
|
|
|
C: Serialize;
|
2023-10-22 16:26:43 -04:00
|
|
|
}
|