pub struct PriceRuleStack {
pub duration: i32,
pub price_rule: Vec<PriceRule>,
pub custom_data: Option<CustomData>,
}Expand description
Part of ISO 15118-20 price schedule.
The OCPP 2.1 PriceRuleStack data type.
Fields§
§duration: i32Duration of the stack of price rules. he amount of seconds that define the duration of the given PriceRule(s).
price_rule: Vec<PriceRule>The priceRule member.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl PriceRuleStack
impl PriceRuleStack
Sourcepub fn new(duration: i32, price_rule: Vec<PriceRule>) -> Self
pub fn new(duration: i32, price_rule: Vec<PriceRule>) -> Self
Creates a PriceRuleStack 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 PriceRuleStack
impl Clone for PriceRuleStack
Source§impl Debug for PriceRuleStack
impl Debug for PriceRuleStack
Source§impl<'de> Deserialize<'de> for PriceRuleStack
impl<'de> Deserialize<'de> for PriceRuleStack
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 PriceRuleStack
impl PartialEq for PriceRuleStack
Source§impl Serialize for PriceRuleStack
impl Serialize for PriceRuleStack
impl StructuralPartialEq for PriceRuleStack
Source§impl Validate for PriceRuleStack
impl Validate for PriceRuleStack
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 PriceRuleStack
impl Freeze for PriceRuleStack
impl RefUnwindSafe for PriceRuleStack
impl Send for PriceRuleStack
impl Sync for PriceRuleStack
impl Unpin for PriceRuleStack
impl UnsafeUnpin for PriceRuleStack
impl UnwindSafe for PriceRuleStack
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