Struct sen0177::i2c::Sen0177

source ·
pub struct Sen0177<A, I2C, E>
where A: AddressMode + Copy, I2C: I2c<A, Error = E>, E: I2cError,
{ /* private fields */ }
Expand description

A SEN0177 device connected via I2C

Implementations§

source§

impl<A, I2C, E> Sen0177<A, I2C, E>
where A: AddressMode + Copy, I2C: I2c<A, Error = E>, E: I2cError,

source

pub fn new(i2c_bus: I2C, address: A) -> Self

Creates a new sensor instance connected to I2C bus i2c_bus at address address

Trait Implementations§

source§

impl<A, I2C, E> AirQualitySensor<E> for Sen0177<A, I2C, E>
where A: AddressMode + Copy, I2C: I2c<A, Error = E>, E: I2cError,

source§

fn read(&mut self) -> Result<Reading, SensorError<E>>

Reads a single sensor measurement Read more

Auto Trait Implementations§

§

impl<A, I2C, E> RefUnwindSafe for Sen0177<A, I2C, E>

§

impl<A, I2C, E> Send for Sen0177<A, I2C, E>
where A: Send, I2C: Send,

§

impl<A, I2C, E> Sync for Sen0177<A, I2C, E>
where A: Sync, I2C: Sync,

§

impl<A, I2C, E> Unpin for Sen0177<A, I2C, E>
where A: Unpin, I2C: Unpin,

§

impl<A, I2C, E> UnwindSafe for Sen0177<A, I2C, E>
where A: UnwindSafe, I2C: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.