pub struct RecentObservation {
pub hydro_id: EntityId,
pub start_date: NaiveDate,
pub end_date: NaiveDate,
pub value_m3s: f64,
}Expand description
Observed inflow for a single hydro plant over a specific date range.
Used to seed the lag accumulator when a study begins mid-season. Each entry
represents the average inflow (in m³/s) observed between start_date
(inclusive) and end_date (exclusive) for one hydro. Multiple entries per
hydro are allowed for rolling revisions with several observed weeks.
Date ranges for the same hydro must not overlap; adjacent ranges
(start_date == previous end_date) are accepted.
Fields§
§hydro_id: EntityIdHydro plant identifier. Must reference a hydro entity in the system.
start_date: NaiveDateStart of the observation period (inclusive).
end_date: NaiveDateEnd of the observation period (exclusive). Must be after start_date.
value_m3s: f64Average inflow observed during the period, in m³/s. Must be finite and non-negative.
Trait Implementations§
Source§impl Clone for RecentObservation
impl Clone for RecentObservation
Source§fn clone(&self) -> RecentObservation
fn clone(&self) -> RecentObservation
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 RecentObservation
impl Debug for RecentObservation
Source§impl PartialEq for RecentObservation
impl PartialEq for RecentObservation
impl StructuralPartialEq for RecentObservation
Auto Trait Implementations§
impl Freeze for RecentObservation
impl RefUnwindSafe for RecentObservation
impl Send for RecentObservation
impl Sync for RecentObservation
impl Unpin for RecentObservation
impl UnsafeUnpin for RecentObservation
impl UnwindSafe for RecentObservation
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