pub struct AmbientPressure(/* private fields */);
Expand description
A runtime checked representation of the ambient pressure compensation value used as an argument for the ambient pressure compensation during continuous measurements. Accepted value range: [700…1400] mBar.
Implementations§
Source§impl AmbientPressure
impl AmbientPressure
Sourcepub const fn to_be_bytes(&self) -> [u8; 2]
pub const fn to_be_bytes(&self) -> [u8; 2]
Returns a big endian byte representation of the ambient pressure value.
Trait Implementations§
Source§impl Debug for AmbientPressure
impl Debug for AmbientPressure
Source§impl PartialEq for AmbientPressure
impl PartialEq for AmbientPressure
Source§impl TryFrom<u16> for AmbientPressure
impl TryFrom<u16> for AmbientPressure
Source§fn try_from(pressure: u16) -> Result<Self, Self::Error>
fn try_from(pressure: u16) -> Result<Self, Self::Error>
Converts a u16 value to an AmbientPressure. The value must be between 700 and 1400 in mBar.
§Errors
- ValueOutOfRange if
pressure
is lower than 700 or higher than 1400 mBar. - UseDefaultPressure if
pressure
is 0.
impl StructuralPartialEq for AmbientPressure
Auto Trait Implementations§
impl Freeze for AmbientPressure
impl RefUnwindSafe for AmbientPressure
impl Send for AmbientPressure
impl Sync for AmbientPressure
impl Unpin for AmbientPressure
impl UnwindSafe for AmbientPressure
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