pub trait OverrideResolver: Send + Sync {
// Required method
fn render_override(
&self,
scope: &OverrideScope<'_>,
vm: &Value,
) -> Option<Result<String, OverrideError>>;
}Expand description
The seam a theme/CMS layer backs with a runtime template engine (MiniJinja)
to let users override a field’s presentation from outside the plugin.
laterite-admin stays engine-agnostic; the default is NoOverrides.
Required Methods§
Sourcefn render_override(
&self,
scope: &OverrideScope<'_>,
vm: &Value,
) -> Option<Result<String, OverrideError>>
fn render_override( &self, scope: &OverrideScope<'_>, vm: &Value, ) -> Option<Result<String, OverrideError>>
An override for this view-model if one is registered for the scope, else
None (use the default). The String is engine-autoescaped HTML.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".