pub struct TransactionLimit {
pub max_cost: Option<Decimal>,
pub max_energy: Option<Decimal>,
pub max_time: Option<i32>,
pub max_so_c: Option<i32>,
pub custom_data: Option<CustomData>,
}Expand description
Cost, energy, time or SoC limit for a transaction.
The OCPP 2.1 TransactionLimit data type.
Fields§
§max_cost: Option<Decimal>Maximum allowed cost of transaction in currency of tariff.
max_energy: Option<Decimal>Maximum allowed energy in Wh to charge in transaction.
max_time: Option<i32>Maximum duration of transaction in seconds from start to end.
max_so_c: Option<i32>Maximum State of Charge of EV in percentage.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl TransactionLimit
impl TransactionLimit
Sourcepub fn with_max_cost(self, value: impl Into<Decimal>) -> Self
pub fn with_max_cost(self, value: impl Into<Decimal>) -> Self
Sets the optional maxCost field.
Sourcepub fn with_max_energy(self, value: impl Into<Decimal>) -> Self
pub fn with_max_energy(self, value: impl Into<Decimal>) -> Self
Sets the optional maxEnergy field.
Sourcepub fn with_max_time(self, value: i32) -> Self
pub fn with_max_time(self, value: i32) -> Self
Sets the optional maxTime field.
Sourcepub fn with_max_so_c(self, value: i32) -> Self
pub fn with_max_so_c(self, value: i32) -> Self
Sets the optional maxSoC field.
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 TransactionLimit
impl Clone for TransactionLimit
Source§fn clone(&self) -> TransactionLimit
fn clone(&self) -> TransactionLimit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TransactionLimit
impl Debug for TransactionLimit
Source§impl Default for TransactionLimit
impl Default for TransactionLimit
Source§fn default() -> TransactionLimit
fn default() -> TransactionLimit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransactionLimit
impl<'de> Deserialize<'de> for TransactionLimit
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 TransactionLimit
impl PartialEq for TransactionLimit
Source§impl Serialize for TransactionLimit
impl Serialize for TransactionLimit
impl StructuralPartialEq for TransactionLimit
Source§impl Validate for TransactionLimit
impl Validate for TransactionLimit
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 Freeze for TransactionLimit
impl RefUnwindSafe for TransactionLimit
impl Send for TransactionLimit
impl Sync for TransactionLimit
impl Unpin for TransactionLimit
impl UnsafeUnpin for TransactionLimit
impl UnwindSafe for TransactionLimit
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