Trait spaceapi::sensors::SensorTemplate
source · pub trait SensorTemplate: Send + Sync {
// Required method
fn try_to_sensor(
&self,
value_str: &str,
sensors: &mut Sensors
) -> Result<(), SensorTemplateError>;
// Provided method
fn to_sensor(&self, value_str: &str, sensors: &mut Sensors) { ... }
}
Expand description
A trait for all possible sensor templates.
A sensor template is like a sensor struct, but without the actual data in it.
A SensorTemplate
is capable of registering itself in a Sensors
struct.