pub struct SensorInterface { /* private fields */ }Implementations§
Source§impl SensorInterface
impl SensorInterface
pub const fn is_available(self) -> bool
pub fn set_state( self, port: impl Into<InputPort>, action: SensorAction, rate: impl Into<SensorRateHz>, ) -> bool
pub fn enable( self, port: impl Into<InputPort>, sensor: Sensor, rate: impl Into<SensorRateHz>, ) -> bool
pub fn disable(self, port: impl Into<InputPort>, sensor: Sensor) -> bool
pub fn input( self, port: impl Into<InputPort>, input: SensorInput, ) -> Option<f32>
Trait Implementations§
Source§impl Clone for SensorInterface
impl Clone for SensorInterface
Source§fn clone(&self) -> SensorInterface
fn clone(&self) -> SensorInterface
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SensorInterface
impl Debug for SensorInterface
Source§impl Default for SensorInterface
impl Default for SensorInterface
Source§fn default() -> SensorInterface
fn default() -> SensorInterface
Returns the “default value” for a type. Read more
impl Copy for SensorInterface
Auto Trait Implementations§
impl Freeze for SensorInterface
impl RefUnwindSafe for SensorInterface
impl Send for SensorInterface
impl Sync for SensorInterface
impl Unpin for SensorInterface
impl UnsafeUnpin for SensorInterface
impl UnwindSafe for SensorInterface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more