pub trait SensorHandler:
Send
+ Sync
+ Debug {
// Required methods
fn handle_reading<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
reading: &'life1 SensorMessage,
context: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_name(&self) -> &str;
fn is_enabled(&self) -> bool;
}
Required Methods§
Sourcefn handle_reading<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
reading: &'life1 SensorMessage,
context: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_reading<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
reading: &'life1 SensorMessage,
context: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publishes the given reading to the target.
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns whether or not the handler is enabled.