pub trait PlateEngine {
// Required methods
fn register_filter(
&mut self,
name: &str,
func: fn(&State<'_, '_>, Value, Kwargs) -> Result<Value, Error>,
);
fn compose(
&mut self,
context: HashMap<String, QuillValue>,
) -> Result<String, TemplateError>;
}Expand description
Trait for plate engines that compose context into output
Required Methods§
Sourcefn register_filter(
&mut self,
name: &str,
func: fn(&State<'_, '_>, Value, Kwargs) -> Result<Value, Error>,
)
fn register_filter( &mut self, name: &str, func: fn(&State<'_, '_>, Value, Kwargs) -> Result<Value, Error>, )
Register a filter with the engine
Sourcefn compose(
&mut self,
context: HashMap<String, QuillValue>,
) -> Result<String, TemplateError>
fn compose( &mut self, context: HashMap<String, QuillValue>, ) -> Result<String, TemplateError>
Compose context from markdown decomposition into output