pub struct Tariff<CustomDataType = NoCustomData> {Show 13 fields
pub charging_time: Option<TariffTime<CustomDataType>>,
pub currency: String<3usize>,
pub custom_data: Option<CustomDataType>,
pub description: Option<Vec<MessageContent<CustomDataType>, 10usize>>,
pub energy: Option<TariffEnergy<CustomDataType>>,
pub fixed_fee: Option<TariffFixed<CustomDataType>>,
pub idle_time: Option<TariffTime<CustomDataType>>,
pub max_cost: Option<Price<CustomDataType>>,
pub min_cost: Option<Price<CustomDataType>>,
pub reservation_fixed: Option<TariffFixed<CustomDataType>>,
pub reservation_time: Option<TariffTime<CustomDataType>>,
pub tariff_id: String<60usize>,
pub valid_from: Option<OcppTimestamp>,
}Expand description
A tariff is described by fields with prices for: energy, charging time, idle time, fixed fee, reservation time, reservation fixed fee. + Each of these fields may have (optional) conditions that specify when a price is applicable. + The description contains a human-readable explanation of the tariff to be shown to the user. + The other fields are parameters that define the tariff. These are used by the charging station to calculate the price.
Fields§
§charging_time: Option<TariffTime<CustomDataType>>§currency: String<3usize>Currency code according to ISO 4217
custom_data: Option<CustomDataType>§description: Option<Vec<MessageContent<CustomDataType>, 10usize>>§energy: Option<TariffEnergy<CustomDataType>>§fixed_fee: Option<TariffFixed<CustomDataType>>§idle_time: Option<TariffTime<CustomDataType>>§max_cost: Option<Price<CustomDataType>>§min_cost: Option<Price<CustomDataType>>§reservation_fixed: Option<TariffFixed<CustomDataType>>§reservation_time: Option<TariffTime<CustomDataType>>§tariff_id: String<60usize>Unique id of tariff
valid_from: Option<OcppTimestamp>Time when this tariff becomes active. When absent, it is immediately active.
Trait Implementations§
Source§impl<'de, CustomDataType> Deserialize<'de> for Tariff<CustomDataType>where
CustomDataType: Deserialize<'de>,
impl<'de, CustomDataType> Deserialize<'de> for Tariff<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 Tariff<CustomDataType>
Auto Trait Implementations§
impl<CustomDataType> Freeze for Tariff<CustomDataType>where
CustomDataType: Freeze,
impl<CustomDataType> RefUnwindSafe for Tariff<CustomDataType>where
CustomDataType: RefUnwindSafe,
impl<CustomDataType> Send for Tariff<CustomDataType>where
CustomDataType: Send,
impl<CustomDataType> Sync for Tariff<CustomDataType>where
CustomDataType: Sync,
impl<CustomDataType> Unpin for Tariff<CustomDataType>where
CustomDataType: Unpin,
impl<CustomDataType> UnsafeUnpin for Tariff<CustomDataType>where
CustomDataType: UnsafeUnpin,
impl<CustomDataType> UnwindSafe for Tariff<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