pub trait RelativeHumidityThresholdWait: RelativeHumiditySensor {
// Required methods
async fn set_relative_humidity_threshold_low(
&mut self,
threshold: Percentage,
) -> Result<(), Self::Error>;
async fn set_relative_humidity_threshold_high(
&mut self,
threshold: Percentage,
) -> Result<(), Self::Error>;
async fn wait_for_relative_humidity_threshold(
&mut self,
) -> Result<Percentage, Self::Error>;
}
Expand description
Asynchronously set and wait for RelativeHumidity measurements to exceed specified thresholds.
Required Methods§
Sourceasync fn set_relative_humidity_threshold_low(
&mut self,
threshold: Percentage,
) -> Result<(), Self::Error>
async fn set_relative_humidity_threshold_low( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>
Set lower RelativeHumidity threshold (in percentage).
Sourceasync fn set_relative_humidity_threshold_high(
&mut self,
threshold: Percentage,
) -> Result<(), Self::Error>
async fn set_relative_humidity_threshold_high( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>
Set upper RelativeHumidity threshold (in percentage).
Sourceasync fn wait_for_relative_humidity_threshold(
&mut self,
) -> Result<Percentage, Self::Error>
async fn wait_for_relative_humidity_threshold( &mut self, ) -> Result<Percentage, Self::Error>
Wait for RelativeHumidity to be measured above or below the previously set high and low thresholds. Returns the measured RelativeHumidity at time threshold is exceeded (in percentage).
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.