[][src]Struct bme680::SettingsBuilder

pub struct SettingsBuilder { /* fields omitted */ }

Builder to construct the desired settings

Example

use bme680::{IIRFilterSize, OversamplingSetting, SettingsBuilder};
use std::time::Duration;
let settings = SettingsBuilder::new()
    .with_humidity_oversampling(OversamplingSetting::OS2x)
    .with_pressure_oversampling(OversamplingSetting::OS4x)
    .with_temperature_oversampling(OversamplingSetting::OS8x)
    .with_temperature_filter(IIRFilterSize::Size3)
    .with_gas_measurement(Duration::from_millis(1500), 320, 25)
    .with_temperature_offset(-4.25)
    .with_run_gas(true)
    .build();

Methods

impl SettingsBuilder[src]

pub fn new() -> SettingsBuilder[src]

pub fn with_temperature_filter(self, filter: IIRFilterSize) -> SettingsBuilder[src]

pub fn with_humidity_control(self, heatr_control: u8) -> SettingsBuilder[src]

pub fn with_temperature_oversampling(
    self,
    os_temp: OversamplingSetting
) -> SettingsBuilder
[src]

pub fn with_pressure_oversampling(
    self,
    os_pres: OversamplingSetting
) -> SettingsBuilder
[src]

pub fn with_humidity_oversampling(
    self,
    os_hum: OversamplingSetting
) -> SettingsBuilder
[src]

pub fn with_gas_measurement(
    self,
    heatr_dur: Duration,
    heatr_temp: u16,
    ambient_temperature: i8
) -> SettingsBuilder
[src]

pub fn with_nb_conv(self, nb_conv: u8) -> SettingsBuilder[src]

pub fn with_run_gas(self, run_gas: bool) -> SettingsBuilder[src]

pub fn with_temperature_offset(self, offset: f32) -> SettingsBuilder[src]

Temperature offset in Celsius, e.g. 4, -8, 1.25

pub fn build(self) -> Settings[src]

Auto Trait Implementations

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.