[][src]Struct sen0177::Sen0177

pub struct Sen0177 { /* fields omitted */ }

An instance of the SEN0177 air quality sensor

Implementations

impl Sen0177[src]

pub fn open<P: AsRef<Path>>(serial_dev: P) -> Result<Sen0177, Sen0177Error>[src]

Opens the sensor on the specified port

Arguments

  • serial_dev - The serial device node the sensor is connected to

pub fn read(&mut self) -> Result<Reading, Sen0177Error>[src]

Reads a single sensor measurement

Note that this function will block until sufficient data is available.

Auto Trait Implementations

impl RefUnwindSafe for Sen0177

impl Send for Sen0177

impl Sync for Sen0177

impl Unpin for Sen0177

impl UnwindSafe for Sen0177

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.