Struct person_sensor::PersonSensorBuilder

source ·
pub struct PersonSensorBuilder<I2C, INT, MODE> { /* private fields */ }
Expand description

Builder for the PersonSensor driver

Use this to create a new instance of the PersonSensor driver

Implementations§

source§

impl<I2C> PersonSensorBuilder<I2C, (), ()>
where I2C: I2c,

source

pub fn new_standby(i2c: I2C) -> PersonSensorBuilder<I2C, (), StandbyMode>

Create a new driver instance without an interrupt, initialized in standby mode

source

pub fn new_continuous( i2c: I2C, ) -> PersonSensorBuilder<I2C, (), ContinuousCaptureMode>

Create a new driver instance without an interrupt, initialized in continuous mode

source§

impl<I2C, MODE> PersonSensorBuilder<I2C, (), MODE>
where I2C: I2c,

source

pub fn with_interrupt<INT: Wait>( self, interrupt: INT, ) -> PersonSensorBuilder<I2C, INT, MODE>

Sets an interrupt pin

source§

impl<I2C, INT> PersonSensorBuilder<I2C, INT, ContinuousCaptureMode>
where I2C: I2c,

source

pub async fn build( self, ) -> Result<PersonSensor<I2C, INT, ContinuousCaptureMode>, I2C::Error>

Initialize the sensor in continuous mode

source§

impl<I2C, INT> PersonSensorBuilder<I2C, INT, StandbyMode>
where I2C: I2c,

source

pub async fn build( self, ) -> Result<PersonSensor<I2C, INT, StandbyMode>, I2C::Error>

Initialize the sensor in standby mode

Auto Trait Implementations§

§

impl<I2C, INT, MODE> Freeze for PersonSensorBuilder<I2C, INT, MODE>
where I2C: Freeze, INT: Freeze,

§

impl<I2C, INT, MODE> RefUnwindSafe for PersonSensorBuilder<I2C, INT, MODE>
where I2C: RefUnwindSafe, INT: RefUnwindSafe, MODE: RefUnwindSafe,

§

impl<I2C, INT, MODE> Send for PersonSensorBuilder<I2C, INT, MODE>
where I2C: Send, INT: Send, MODE: Send,

§

impl<I2C, INT, MODE> Sync for PersonSensorBuilder<I2C, INT, MODE>
where I2C: Sync, INT: Sync, MODE: Sync,

§

impl<I2C, INT, MODE> Unpin for PersonSensorBuilder<I2C, INT, MODE>
where I2C: Unpin, INT: Unpin, MODE: Unpin,

§

impl<I2C, INT, MODE> UnwindSafe for PersonSensorBuilder<I2C, INT, MODE>
where I2C: UnwindSafe, INT: UnwindSafe, MODE: 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.