pub struct TotalCost<CustomDataType = NoCustomData> {
pub charging_time: Option<Price<CustomDataType>>,
pub currency: String<3usize>,
pub custom_data: Option<CustomDataType>,
pub energy: Option<Price<CustomDataType>>,
pub fixed: Option<Price<CustomDataType>>,
pub idle_time: Option<Price<CustomDataType>>,
pub reservation_fixed: Option<Price<CustomDataType>>,
pub reservation_time: Option<Price<CustomDataType>>,
pub total: TotalPrice<CustomDataType>,
pub type_of_cost: TariffCostEnum,
}Expand description
This contains the cost calculated during a transaction. It is used both for running cost and final cost of the transaction.
Fields§
§charging_time: Option<Price<CustomDataType>>§currency: String<3usize>Currency of the costs in ISO 4217 Code.
custom_data: Option<CustomDataType>§energy: Option<Price<CustomDataType>>§fixed: Option<Price<CustomDataType>>§idle_time: Option<Price<CustomDataType>>§reservation_fixed: Option<Price<CustomDataType>>§reservation_time: Option<Price<CustomDataType>>§total: TotalPrice<CustomDataType>§type_of_cost: TariffCostEnumTrait Implementations§
Source§impl<'de, CustomDataType> Deserialize<'de> for TotalCost<CustomDataType>where
CustomDataType: Deserialize<'de>,
impl<'de, CustomDataType> Deserialize<'de> for TotalCost<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
impl<CustomDataType: PartialEq> StructuralPartialEq for TotalCost<CustomDataType>
Auto Trait Implementations§
impl<CustomDataType> Freeze for TotalCost<CustomDataType>where
CustomDataType: Freeze,
impl<CustomDataType> RefUnwindSafe for TotalCost<CustomDataType>where
CustomDataType: RefUnwindSafe,
impl<CustomDataType> Send for TotalCost<CustomDataType>where
CustomDataType: Send,
impl<CustomDataType> Sync for TotalCost<CustomDataType>where
CustomDataType: Sync,
impl<CustomDataType> Unpin for TotalCost<CustomDataType>where
CustomDataType: Unpin,
impl<CustomDataType> UnsafeUnpin for TotalCost<CustomDataType>where
CustomDataType: UnsafeUnpin,
impl<CustomDataType> UnwindSafe for TotalCost<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