pub struct BarometerPayload {
pub pressure: Pressure,
pub temperature: ThermodynamicTemperature,
}Expand description
Standardized barometer payload carrying pressure and temperature.
Fields§
§pressure: Pressure§temperature: ThermodynamicTemperatureImplementations§
Source§impl BarometerPayload
impl BarometerPayload
Sourcepub fn from_raw(pressure_pa: f32, temperature_c: f32) -> Self
pub fn from_raw(pressure_pa: f32, temperature_c: f32) -> Self
Build a barometer payload from scalar values.
pressure_pa- pressure in Pascal.temperature_c- temperature in °C.
Sourcepub fn from_units(
pressure: Pressure,
temperature: ThermodynamicTemperature,
) -> Self
pub fn from_units( pressure: Pressure, temperature: ThermodynamicTemperature, ) -> Self
Build a barometer payload from unit-carrying types.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for BarometerPayload
impl<'__de, __Context> BorrowDecode<'__de, __Context> for BarometerPayload
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for BarometerPayload
impl Clone for BarometerPayload
Source§fn clone(&self) -> BarometerPayload
fn clone(&self) -> BarometerPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 BarometerPayload
impl Debug for BarometerPayload
Source§impl<__Context> Decode<__Context> for BarometerPayload
impl<__Context> Decode<__Context> for BarometerPayload
Source§impl Default for BarometerPayload
impl Default for BarometerPayload
Source§impl<'de> Deserialize<'de> for BarometerPayload
impl<'de> Deserialize<'de> for BarometerPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for BarometerPayload
impl Encode for BarometerPayload
Source§impl PartialEq for BarometerPayload
impl PartialEq for BarometerPayload
Source§impl Serialize for BarometerPayload
impl Serialize for BarometerPayload
impl Copy for BarometerPayload
impl StructuralPartialEq for BarometerPayload
Auto Trait Implementations§
impl Freeze for BarometerPayload
impl RefUnwindSafe for BarometerPayload
impl Send for BarometerPayload
impl Sync for BarometerPayload
impl Unpin for BarometerPayload
impl UnsafeUnpin for BarometerPayload
impl UnwindSafe for BarometerPayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CuPayloadSize for Twhere
T: CuMsgPayload,
impl<T> CuPayloadSize for Twhere
T: CuMsgPayload,
Source§impl<T> ElementType for T
impl<T> ElementType for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more