Struct bhi160::parameters::sensors::LightConfig
source · [−]pub struct LightConfig { /* private fields */ }
Implementations
sourceimpl LightConfig
impl LightConfig
sourceimpl LightConfig
impl LightConfig
sourceimpl LightConfig
impl LightConfig
sourcepub fn get_0(&self) -> <SensorConfig as Specifier>::InOut
pub fn get_0(&self) -> <SensorConfig as Specifier>::InOut
Returns the value of 0.
sourcepub fn get_0_or_err(
&self
) -> Result<<SensorConfig as Specifier>::InOut, InvalidBitPattern<<SensorConfig as Specifier>::Bytes>>
pub fn get_0_or_err(
&self
) -> Result<<SensorConfig as Specifier>::InOut, InvalidBitPattern<<SensorConfig as Specifier>::Bytes>>
Returns the value of 0.
#Errors
If the returned value contains an invalid bit pattern for 0.
sourcepub fn with_0(self, new_val: <SensorConfig as Specifier>::InOut) -> Self
pub fn with_0(self, new_val: <SensorConfig as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of 0 set to the given value.
#Panics
If the given value is out of bounds for 0.
sourcepub fn with_0_checked(
self,
new_val: <SensorConfig as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_0_checked(
self,
new_val: <SensorConfig as Specifier>::InOut
) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of 0 set to the given value.
#Errors
If the given value is out of bounds for 0.
sourcepub fn set_0(&mut self, new_val: <SensorConfig as Specifier>::InOut)
pub fn set_0(&mut self, new_val: <SensorConfig as Specifier>::InOut)
Sets the value of 0 to the given value.
#Panics
If the given value is out of bounds for 0.
sourcepub fn set_0_checked(
&mut self,
new_val: <SensorConfig as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_0_checked(
&mut self,
new_val: <SensorConfig as Specifier>::InOut
) -> Result<(), OutOfBounds>
Sets the value of 0 to the given value.
#Errors
If the given value is out of bounds for 0.
Trait Implementations
sourceimpl Clone for LightConfig
impl Clone for LightConfig
sourcefn clone(&self) -> LightConfig
fn clone(&self) -> LightConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LightConfig
impl Debug for LightConfig
sourceimpl From<LightConfig> for [u8; 8]
impl From<LightConfig> for [u8; 8]
sourcefn from(reg: LightConfig) -> Self
fn from(reg: LightConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for LightConfig
impl Send for LightConfig
impl Sync for LightConfig
impl Unpin for LightConfig
impl UnwindSafe for LightConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more