Starting to create the renderer integrations.
These are the layer directly over dust which can be used by anything, not just blog posts.
This commit is contained in:
15
src/render/renderer_integration.rs
Normal file
15
src/render/renderer_integration.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::error::CustomError;
|
||||
|
||||
pub trait RendererIntegration {
|
||||
fn load_templates<I, P>(&mut self, dust_templates: I) -> Result<(), CustomError>
|
||||
where
|
||||
I: Iterator<Item = P>,
|
||||
P: Into<PathBuf>;
|
||||
|
||||
fn render<P>(&self, context: &str, build_directory: P) -> Result<String, CustomError>
|
||||
where
|
||||
P: AsRef<Path>;
|
||||
}
|
||||
Reference in New Issue
Block a user