pub struct Measurement {
pub temperature_centi_celsius: i32,
pub pressure_centi_pascals: u32,
pub humidity_q22_10: u32,
}Expand description
A compensated BME280 measurement.
The fields are the exact integer outputs of the compensation formulas; the methods present them in conventional units.
Fields§
§temperature_centi_celsius: i32Temperature in hundredths of a degree Celsius.
pressure_centi_pascals: u32Pressure in hundredths of a pascal.
humidity_q22_10: u32Relative humidity in Q22.10 fixed-point, that is units of 1/1024 percent.
Implementations§
Source§impl Measurement
impl Measurement
Sourcepub fn hectopascals(&self) -> f32
pub fn hectopascals(&self) -> f32
Returns the pressure in hectopascals (millibars).
Sourcepub fn relative_humidity_percent(&self) -> f32
pub fn relative_humidity_percent(&self) -> f32
Returns the relative humidity in percent.
Trait Implementations§
Source§impl Clone for Measurement
impl Clone for Measurement
Source§fn clone(&self) -> Measurement
fn clone(&self) -> Measurement
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 moreimpl Copy for Measurement
Source§impl Debug for Measurement
impl Debug for Measurement
impl Eq for Measurement
Source§impl PartialEq for Measurement
impl PartialEq for Measurement
Source§fn eq(&self, other: &Measurement) -> bool
fn eq(&self, other: &Measurement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Measurement
Auto Trait Implementations§
impl Freeze for Measurement
impl RefUnwindSafe for Measurement
impl Send for Measurement
impl Sync for Measurement
impl Unpin for Measurement
impl UnsafeUnpin for Measurement
impl UnwindSafe for Measurement
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