pub struct ConsolidatedRecord {
pub station_id: u32,
pub station_name: String,
pub date: NaiveDate,
pub latitude: f64,
pub longitude: f64,
pub min_temp: f32,
pub max_temp: f32,
pub avg_temp: f32,
pub quality_flags: String,
}Fields§
§station_id: u32§station_name: String§date: NaiveDate§latitude: f64§longitude: f64§min_temp: f32§max_temp: f32§avg_temp: f32§quality_flags: StringImplementations§
Source§impl ConsolidatedRecord
impl ConsolidatedRecord
pub fn new( station_id: u32, station_name: String, date: NaiveDate, latitude: f64, longitude: f64, min_temp: f32, max_temp: f32, avg_temp: f32, quality_flags: String, ) -> Self
pub fn validate_relationships(&self) -> Result<()>
pub fn temperature_range(&self) -> f32
pub fn has_valid_data(&self) -> bool
pub fn has_suspect_data(&self) -> bool
pub fn has_missing_data(&self) -> bool
pub fn is_complete(&self) -> bool
Trait Implementations§
Source§impl Clone for ConsolidatedRecord
impl Clone for ConsolidatedRecord
Source§fn clone(&self) -> ConsolidatedRecord
fn clone(&self) -> ConsolidatedRecord
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 ConsolidatedRecord
impl Debug for ConsolidatedRecord
Source§impl<'de> Deserialize<'de> for ConsolidatedRecord
impl<'de> Deserialize<'de> for ConsolidatedRecord
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 Serialize for ConsolidatedRecord
impl Serialize for ConsolidatedRecord
Source§impl Validate for ConsolidatedRecord
impl Validate for ConsolidatedRecord
Source§impl<'v_a> ValidateArgs<'v_a> for ConsolidatedRecord
impl<'v_a> ValidateArgs<'v_a> for ConsolidatedRecord
Auto Trait Implementations§
impl Freeze for ConsolidatedRecord
impl RefUnwindSafe for ConsolidatedRecord
impl Send for ConsolidatedRecord
impl Sync for ConsolidatedRecord
impl Unpin for ConsolidatedRecord
impl UnwindSafe for ConsolidatedRecord
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> 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