pub struct StationReading {
pub value: f64,
pub supplied: bool,
}Expand description
A station temperature or pressure on a presence-carrying request (0.49.0): the value the engine is handed and whether the caller supplied it.
On the wire it is a bare JSON number when supplied and ABSENT when omitted. The type’s own
Deserialize rejects a JSON null; the truing DTOs (TruingModelInputsV1,
WindTruingRequest) read a null field as omitted, as the card.* requests do. An omitted
reading carries the surface’s legacy default (59 °F / 29.92 inHg on
the truing DTOs, the metric CLI’s 1013.25 hPa expressed in inHg, and so on), so it resolves
exactly as that default did before 0.49.0. Use Self::omitted for that, never a bare
Option: at |altitude| <= 1 m an omitted value flies as itself, so the default it carries
is part of the result.
Fields§
§value: f64The value handed to the engine.
supplied: boolWhether the caller supplied it. false means the legacy default-sentinel rule decides.
Implementations§
Source§impl StationReading
impl StationReading
Sourcepub const fn omitted(default_value: f64) -> Self
pub const fn omitted(default_value: f64) -> Self
No reading: default_value is the surface’s legacy default, resolved by the
pre-0.49.0 rule (ICAO standard at a real altitude when it is the sea-level default).
Sourcepub fn is_omitted(&self) -> bool
pub fn is_omitted(&self) -> bool
true when no reading was supplied. Used as skip_serializing_if.
Trait Implementations§
Source§impl Clone for StationReading
impl Clone for StationReading
Source§fn clone(&self) -> StationReading
fn clone(&self) -> StationReading
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StationReading
impl Debug for StationReading
Source§impl<'de> Deserialize<'de> for StationReading
impl<'de> Deserialize<'de> for StationReading
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl PartialEq for StationReading
impl PartialEq for StationReading
Source§impl Serialize for StationReading
impl Serialize for StationReading
impl Copy for StationReading
impl StructuralPartialEq for StationReading
Auto Trait Implementations§
impl Freeze for StationReading
impl RefUnwindSafe for StationReading
impl Send for StationReading
impl Sync for StationReading
impl Unpin for StationReading
impl UnwindSafe for StationReading
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.