pub trait TemplateMetadata {
// Required method
fn template_name() -> &'static str;
// Provided methods
fn template_version() -> Option<&'static str> { ... }
fn template_definition_metric_name() -> String { ... }
}Expand description
Provides metadata information for a Template
This trait defines basic metadata for Sparkplug templates
Required Methods§
Sourcefn template_name() -> &'static str
fn template_name() -> &'static str
Provide the name of the template
Provided Methods§
Sourcefn template_version() -> Option<&'static str>
fn template_version() -> Option<&'static str>
Provide an optional version for the template
Sourcefn template_definition_metric_name() -> String
fn template_definition_metric_name() -> String
Provides a name that will be used as the metric name for the templates definition in a birth message.
This should be unique in the context of an Edge Node. By default, this method combines the template name and version (if available) to create a metric name that follows Sparkplug conventions. The format is:
- With version:
"template_name:version" - Without version:
"template_name"
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.