pub struct Bme680SensorBuilder<I2C, D>where
    I2C: Read + Write,
    D: DelayMs<u8>,{ /* private fields */ }
Expand description

Builder for Bme680Sensor instances.

Implementations§

source§

impl<I2C, D> Bme680SensorBuilder<I2C, D>where I2C: Read + Write, D: DelayMs<u8>,

source

pub fn new(bme680: Bme680<I2C, D>, delay: D) -> Self

Create a new builder instance with bme680.

Uses the following defaults:

  • initial_ambient_temp_celsius = 20.0
  • temp_offset_celsius = 0.0
  • disable_baseline_tracker = false
source

pub fn initial_ambient_temp_celsius(self, value: f32) -> Self

Sets the initial ambient temperature in Celsius to value.

source

pub fn temp_offset_celsius(self, value: f32) -> Self

Sets the temperature offset in Celsius to value.

source

pub fn disable_baseline_tracker(self, status: Option<f32>) -> Self

Set the status of the BSEC baseline tracker to status.

source

pub fn build(self) -> Bme680Sensor<I2C, D>

Consume current configuration and create Bme680Sensor instance.

Auto Trait Implementations§

§

impl<I2C, D> RefUnwindSafe for Bme680SensorBuilder<I2C, D>where D: RefUnwindSafe, I2C: RefUnwindSafe,

§

impl<I2C, D> Send for Bme680SensorBuilder<I2C, D>where D: Send, I2C: Send,

§

impl<I2C, D> Sync for Bme680SensorBuilder<I2C, D>where D: Sync, I2C: Sync,

§

impl<I2C, D> Unpin for Bme680SensorBuilder<I2C, D>where D: Unpin, I2C: Unpin,

§

impl<I2C, D> UnwindSafe for Bme680SensorBuilder<I2C, D>where D: UnwindSafe, I2C: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.