pub trait HasDataType {
// Required method
fn supported_datatypes() -> &'static [DataType];
// Provided method
fn default_datatype() -> DataType { ... }
}Expand description
Trait used to query the Sparkplug datatype(s) that an implementing type supports
Required Methods§
Sourcefn supported_datatypes() -> &'static [DataType]
fn supported_datatypes() -> &'static [DataType]
Get all the Sparkplug crate::payload::DataType’s the type supports
Provided Methods§
Sourcefn default_datatype() -> DataType
fn default_datatype() -> DataType
Default crate::payload::DataType the type maps to
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.