use IntoResponse;
use Serialize;
/// An abstraction over different templating engines
///
/// # Implementing custom engines
///
/// ```
/// # use axum_template::TemplateEngine;
/// # use serde::Serialize;
/// # use std::convert::Infallible;
///
/// #[derive(Debug)]
/// pub struct CustomEngine;
///
/// impl TemplateEngine for CustomEngine {
/// type Error = Infallible;
/// fn render<S: Serialize>(&self, key: &str, data: S) -> Result<String, Self::Error> {
/// /* Render your template and return the result */
/// let result = "Hello world".into();
/// Ok(result)
/// }
/// }
/// ```
///
/// > See the full working example [`custom_engine.rs`]
///
/// [`custom_engine.rs`]: https://github.com/Altair-Bueno/axum-template/blob/main/examples/custom_engine.rs