natter/src/render/renderer_integration.rs

15 lines
357 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: Into<String>;
2023-10-22 20:40:58 +00:00
fn render<C>(&self, context: C) -> Result<String, crate::error::CustomError>
where
2023-10-22 20:40:58 +00:00
C: Serialize;
}