[][src]Struct iaq_core::IaqCore

pub struct IaqCore<I2C> { /* fields omitted */ }

iAQ-Core device driver

Methods

impl<E, I2C> IaqCore<I2C> where
    I2C: Read<Error = E>, 
[src]

pub fn new(i2c: I2C) -> Self[src]

Create new instance of the iAQ-Core device.

pub fn destroy(self) -> I2C[src]

Destroy driver instance, return I²C bus instance.

pub fn data(&mut self) -> Result<Measurement, Error<E>>[src]

Get all data from the sensor measurement

Returns nb::Error::WouldBlock in case the device reports a busy or warm up status.

pub fn co2(&mut self) -> Result<u16, Error<E>>[src]

Get the CO2 (ppm) equivalent prediction value

Returns nb::Error::WouldBlock in case the device reports a busy or warm up status.

pub fn tvoc(&mut self) -> Result<u16, Error<E>>[src]

Get the TVOC (ppb) equivalent prediction value

Returns nb::Error::WouldBlock in case the device reports a busy or warm up status.

pub fn resistance(&mut self) -> Result<u32, Error<E>>[src]

Get the sensor resistance in Ohm

Returns nb::Error::WouldBlock in case the device reports a busy or warm up status.

Trait Implementations

impl<I2C: Debug> Debug for IaqCore<I2C>[src]

Auto Trait Implementations

impl<I2C> RefUnwindSafe for IaqCore<I2C> where
    I2C: RefUnwindSafe

impl<I2C> Send for IaqCore<I2C> where
    I2C: Send

impl<I2C> Sync for IaqCore<I2C> where
    I2C: Sync

impl<I2C> Unpin for IaqCore<I2C> where
    I2C: Unpin

impl<I2C> UnwindSafe for IaqCore<I2C> where
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.