pub struct Tariff {
pub id: OcpiString<36>,
pub currency: Currency,
pub tariff_alt_text: Vec<DisplayText>,
pub tariff_alt_url: Option<Url>,
pub elements: Vec<TariffElement>,
pub energy_mix: Option<EnergyMix>,
pub last_updated: DateTime,
pub extensions: Extensions,
}Available on crate feature
v2_1_1 only.Expand description
A tariff, in OCPI 2.1.1.
Spec: 2.1.1 §mod_tariffs_tariff_object
Fields§
§id: OcpiString<36>Uniquely identifies the tariff within the CPO’s platform.
currency: CurrencyCurrency of this tariff, ISO 4217 code.
tariff_alt_text: Vec<DisplayText>Multi-language alternative tariff info text.
tariff_alt_url: Option<Url>Alternative URL to tariff info.
elements: Vec<TariffElement>The Tariff Elements. Cardinality +.
energy_mix: Option<EnergyMix>Details on the energy supplied with this tariff.
last_updated: DateTimeTimestamp when this Tariff was last updated (or created).
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tariff
impl<'de> Deserialize<'de> for Tariff
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 JsonSchema for Tariff
impl JsonSchema for Tariff
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Tariff
Auto Trait Implementations§
impl Freeze for Tariff
impl RefUnwindSafe for Tariff
impl Send for Tariff
impl Sync for Tariff
impl Unpin for Tariff
impl UnsafeUnpin for Tariff
impl UnwindSafe for Tariff
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