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