pub struct Overview {
pub last_updated_time: NaiveDateTime,
pub life_time_data: TimeData,
pub last_year_data: TimeData,
pub last_month_data: TimeData,
pub last_day_data: TimeData,
pub current_power: GeneratedPowerW,
pub measured_by: String,
}
Expand description
The overview of a site includes the site current power, daily energy, monthly energy, yearly energy and life time energy.
Fields§
§last_updated_time: NaiveDateTime
§life_time_data: TimeData
§last_year_data: TimeData
§last_month_data: TimeData
§last_day_data: TimeData
§current_power: GeneratedPowerW
§measured_by: String
Implementations§
Source§impl Overview
impl Overview
Sourcepub fn estimated_next_update(&self) -> (NaiveDateTime, Duration)
pub fn estimated_next_update(&self) -> (NaiveDateTime, Duration)
Calculates the next timestamp and the duration from now when new data
should be available on the API. It uses last_update_time
and 15
minutes and 10 seconds as delta between updates
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Overview
impl<'de> Deserialize<'de> for Overview
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
Auto Trait Implementations§
impl Freeze for Overview
impl !RefUnwindSafe for Overview
impl Send for Overview
impl Sync for Overview
impl Unpin for Overview
impl !UnwindSafe for Overview
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