pub trait Template: TemplateMetadata + TryFrom<TemplateInstance> {
// Required methods
fn template_definition() -> TemplateDefinition;
fn template_instance(&self) -> TemplateInstance;
}Expand description
Trait used to represent a Template
It is strongly recommended to use the srad_macros::Template derive macro instead of implementing this trait manually
Required Methods§
Sourcefn template_definition() -> TemplateDefinition
fn template_definition() -> TemplateDefinition
Returns the template definition
Sourcefn template_instance(&self) -> TemplateInstance
fn template_instance(&self) -> TemplateInstance
Creates a template instance from the current state
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.