pub struct PriceLevelScheduleEntry {
pub duration: i32,
pub price_level: i32,
pub custom_data: Option<CustomData>,
}Expand description
Part of ISO 15118-20 price schedule.
The OCPP 2.1 PriceLevelScheduleEntry data type.
Fields§
§duration: i32The amount of seconds that define the duration of this given PriceLevelScheduleEntry.
price_level: i32Defines the price level of this PriceLevelScheduleEntry (referring to NumberOfPriceLevels). Small values for the PriceLevel represent a cheaper PriceLevelScheduleEntry. Large values for the PriceLevel represent a more expensive PriceLevelScheduleEntry.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl PriceLevelScheduleEntry
impl PriceLevelScheduleEntry
Sourcepub fn new(duration: i32, price_level: i32) -> Self
pub fn new(duration: i32, price_level: i32) -> Self
Creates a PriceLevelScheduleEntry from its required fields.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl Clone for PriceLevelScheduleEntry
impl Clone for PriceLevelScheduleEntry
Source§impl Debug for PriceLevelScheduleEntry
impl Debug for PriceLevelScheduleEntry
Source§impl<'de> Deserialize<'de> for PriceLevelScheduleEntry
impl<'de> Deserialize<'de> for PriceLevelScheduleEntry
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 PartialEq for PriceLevelScheduleEntry
impl PartialEq for PriceLevelScheduleEntry
Source§impl Serialize for PriceLevelScheduleEntry
impl Serialize for PriceLevelScheduleEntry
impl StructuralPartialEq for PriceLevelScheduleEntry
Source§impl Validate for PriceLevelScheduleEntry
impl Validate for PriceLevelScheduleEntry
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Forget for PriceLevelScheduleEntry
impl Freeze for PriceLevelScheduleEntry
impl RefUnwindSafe for PriceLevelScheduleEntry
impl Send for PriceLevelScheduleEntry
impl Sync for PriceLevelScheduleEntry
impl Unpin for PriceLevelScheduleEntry
impl UnsafeUnpin for PriceLevelScheduleEntry
impl UnwindSafe for PriceLevelScheduleEntry
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