2023-10-22 20:26:43 +00:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
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 20:40:58 +00:00
|
|
|
pub(crate) trait RendererIntegration {
|
2023-10-22 20:26:43 +00:00
|
|
|
fn load_templates<I, P>(&mut self, dust_templates: I) -> Result<(), CustomError>
|
|
|
|
where
|
|
|
|
I: Iterator<Item = P>,
|
|
|
|
P: Into<PathBuf>;
|
|
|
|
|
2023-10-22 20:40:58 +00:00
|
|
|
fn render<C>(&self, context: C) -> Result<String, crate::error::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
|
|
|
}
|