#[non_exhaustive]pub struct TariffInformation {
pub period: Option<TariffPeriod>,
pub season: Option<TariffSeason>,
pub block: Option<u32>,
pub demand_window: Option<bool>,
}
Expand description
Information about how your tariff affects an interval
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.period: Option<TariffPeriod>
The Time of Use period that is currently active.
Only available if the site in on a time of use tariff
season: Option<TariffSeason>
The Time of Use season that is currently active.
Only available if the site in on a time of use tariff
block: Option<u32>
The block that is currently active.
Only available in the site in on a block tariff
demand_window: Option<bool>
Is this interval currently in the demand window?
Only available if the site in on a demand tariff
Trait Implementations§
Source§impl Clone for TariffInformation
impl Clone for TariffInformation
Source§fn clone(&self) -> TariffInformation
fn clone(&self) -> TariffInformation
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 TariffInformation
impl Debug for TariffInformation
Source§impl<'de> Deserialize<'de> for TariffInformation
impl<'de> Deserialize<'de> for TariffInformation
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 Display for TariffInformation
impl Display for TariffInformation
Source§impl PartialEq for TariffInformation
impl PartialEq for TariffInformation
impl StructuralPartialEq for TariffInformation
Auto Trait Implementations§
impl Freeze for TariffInformation
impl RefUnwindSafe for TariffInformation
impl Send for TariffInformation
impl Sync for TariffInformation
impl Unpin for TariffInformation
impl UnwindSafe for TariffInformation
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