Trait RelativeHumidityThresholdWait

Source
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§

Source

async fn set_relative_humidity_threshold_low( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>

Set lower RelativeHumidity threshold (in percentage).

Source

async fn set_relative_humidity_threshold_high( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>

Set upper RelativeHumidity threshold (in percentage).

Source

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.

Implementations on Foreign Types§

Source§

impl<T: RelativeHumidityThresholdWait + ?Sized> RelativeHumidityThresholdWait for &mut T

Source§

async fn set_relative_humidity_threshold_low( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>

Source§

async fn set_relative_humidity_threshold_high( &mut self, threshold: Percentage, ) -> Result<(), Self::Error>

Source§

async fn wait_for_relative_humidity_threshold( &mut self, ) -> Result<Percentage, Self::Error>

Implementors§