pub trait TemperatureThresholdWait: ErrorType {
// Required methods
async fn wait_for_temperature_low(
&mut self,
threshold: DegreesCelsius,
) -> Result<(), Self::Error>;
async fn wait_for_temperature_high(
&mut self,
threshold: DegreesCelsius,
) -> Result<(), Self::Error>;
async fn wait_for_temperature_out_of_range(
&mut self,
threshold_low: DegreesCelsius,
threshold_high: DegreesCelsius,
) -> Result<(), Self::Error>;
}
Expand description
Asynchronously wait for Temperature measurements to exceed specified thresholds.
Required Methods§
Sourceasync fn wait_for_temperature_low(
&mut self,
threshold: DegreesCelsius,
) -> Result<(), Self::Error>
async fn wait_for_temperature_low( &mut self, threshold: DegreesCelsius, ) -> Result<(), Self::Error>
Wait for Temperature to be measured below the given threshold (in degrees Celsius).
Sourceasync fn wait_for_temperature_high(
&mut self,
threshold: DegreesCelsius,
) -> Result<(), Self::Error>
async fn wait_for_temperature_high( &mut self, threshold: DegreesCelsius, ) -> Result<(), Self::Error>
Wait for Temperature to be measured above the given threshold (in degrees Celsius).
Sourceasync fn wait_for_temperature_out_of_range(
&mut self,
threshold_low: DegreesCelsius,
threshold_high: DegreesCelsius,
) -> Result<(), Self::Error>
async fn wait_for_temperature_out_of_range( &mut self, threshold_low: DegreesCelsius, threshold_high: DegreesCelsius, ) -> Result<(), Self::Error>
Wait for Temperature to be measured above or below the given high and low thresholds (in degrees Celsius).
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.