pub struct CostDetails<CustomDataType = NoCustomData> {
pub charging_periods: Option<Vec<ChargingPeriod<CustomDataType>>>,
pub custom_data: Option<CustomDataType>,
pub failure_reason: Option<String<500usize>>,
pub failure_to_calculate: Option<bool>,
pub total_cost: TotalCost<CustomDataType>,
pub total_usage: TotalUsage<CustomDataType>,
}Expand description
CostDetailsType contains the cost as calculated by Charging Station based on provided TariffType.
NOTE: Reservation is not shown as a chargingPeriod, because it took place outside of the transaction.
Fields§
§charging_periods: Option<Vec<ChargingPeriod<CustomDataType>>>§custom_data: Option<CustomDataType>§failure_reason: Option<String<500usize>>Optional human-readable reason text in case of failure to calculate.
failure_to_calculate: Option<bool>If set to true, then Charging Station has failed to calculate the cost.
total_cost: TotalCost<CustomDataType>§total_usage: TotalUsage<CustomDataType>Trait Implementations§
Source§impl<CustomDataType: Clone> Clone for CostDetails<CustomDataType>
impl<CustomDataType: Clone> Clone for CostDetails<CustomDataType>
Source§fn clone(&self) -> CostDetails<CustomDataType>
fn clone(&self) -> CostDetails<CustomDataType>
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<CustomDataType: Debug> Debug for CostDetails<CustomDataType>
impl<CustomDataType: Debug> Debug for CostDetails<CustomDataType>
Source§impl<'de, CustomDataType> Deserialize<'de> for CostDetails<CustomDataType>where
CustomDataType: Deserialize<'de>,
impl<'de, CustomDataType> Deserialize<'de> for CostDetails<CustomDataType>where
CustomDataType: Deserialize<'de>,
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<CustomDataType: PartialEq> PartialEq for CostDetails<CustomDataType>
impl<CustomDataType: PartialEq> PartialEq for CostDetails<CustomDataType>
Source§impl<CustomDataType> Serialize for CostDetails<CustomDataType>where
CustomDataType: Serialize,
impl<CustomDataType> Serialize for CostDetails<CustomDataType>where
CustomDataType: Serialize,
impl<CustomDataType: PartialEq> StructuralPartialEq for CostDetails<CustomDataType>
Source§impl<CustomDataType> Validate for CostDetails<CustomDataType>
Available on crate features alloc and validate only.
impl<CustomDataType> Validate for CostDetails<CustomDataType>
Available on crate features
alloc and validate only.Auto Trait Implementations§
impl<CustomDataType> Freeze for CostDetails<CustomDataType>where
CustomDataType: Freeze,
impl<CustomDataType> RefUnwindSafe for CostDetails<CustomDataType>where
CustomDataType: RefUnwindSafe,
impl<CustomDataType> Send for CostDetails<CustomDataType>where
CustomDataType: Send,
impl<CustomDataType> Sync for CostDetails<CustomDataType>where
CustomDataType: Sync,
impl<CustomDataType> Unpin for CostDetails<CustomDataType>where
CustomDataType: Unpin,
impl<CustomDataType> UnsafeUnpin for CostDetails<CustomDataType>where
CustomDataType: UnsafeUnpin,
impl<CustomDataType> UnwindSafe for CostDetails<CustomDataType>where
CustomDataType: UnwindSafe,
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