Struct bme680::SettingsBuilder[][src]

pub struct SettingsBuilder { /* fields omitted */ }

Builder to construct the desired settings

Example

use bme680::{IIRFilterSize, OversamplingSetting, SettingsBuilder};
use std::time::Duration;
let settings = SettingsBuilder::default()
    .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();

Implementations

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]

Trait Implementations

impl Default for SettingsBuilder[src]

fn default() -> SettingsBuilder[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.