pub struct DataPeriod {
pub start_date: NaiveDate,
pub end_date: NaiveDate,
}
Expand description
The period defined by start_date and end_date that this site is producting energy
Fields§
§start_date: NaiveDate
§end_date: NaiveDate
Implementations§
Source§impl DataPeriod
impl DataPeriod
Sourcepub fn formatted_start_date(&self) -> String
pub fn formatted_start_date(&self) -> String
create a formatted String
for the start date
in %Y-%m-%d
format, i.e. 2023-11-9
for november 9th 2023
Sourcepub fn formatted_end_date(&self) -> String
pub fn formatted_end_date(&self) -> String
create a formatted String
for the end date
in %Y-%m-%d
format, i.e. 2023-11-9
for november 9th 2023
Trait Implementations§
Source§impl Clone for DataPeriod
impl Clone for DataPeriod
Source§fn clone(&self) -> DataPeriod
fn clone(&self) -> DataPeriod
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 DataPeriod
impl Debug for DataPeriod
Source§impl<'de> Deserialize<'de> for DataPeriod
impl<'de> Deserialize<'de> for DataPeriod
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 DataPeriod
impl RefUnwindSafe for DataPeriod
impl Send for DataPeriod
impl Sync for DataPeriod
impl Unpin for DataPeriod
impl UnwindSafe for DataPeriod
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