natter/src/render/renderer_integration.rs

15 lines
341 B
Rust
Raw Normal View History

2023-10-22 20:40:58 +00:00
use serde::Serialize;
use crate::error::CustomError;
2023-10-22 20:40:58 +00:00
pub(crate) trait RendererIntegration {
fn load_template<N, C>(&mut self, name: N, contents: C) -> Result<(), CustomError>
where
N: Into<String>,
C: AsRef<str>;
fn render<C>(&self, context: C) -> Result<String, CustomError>
where
2023-10-22 20:40:58 +00:00
C: Serialize;
}