pub struct PartialCdr {Show 13 fields
pub currency_code: Code,
pub party_id: Option<CpoId>,
pub start_date_time: DateTime<Utc>,
pub end_date_time: DateTime<Utc>,
pub total_energy: Option<Kwh>,
pub total_charging_duration: Option<TimeDelta>,
pub total_idle_duration: Option<TimeDelta>,
pub total_cost: Option<Price>,
pub total_energy_cost: Option<Price>,
pub total_fixed_cost: Option<Price>,
pub total_idle_duration_cost: Option<Price>,
pub total_charging_duration_cost: Option<Price>,
pub charging_periods: Vec<ChargingPeriod>,
}Expand description
A partial CDR generated by the cdr_from_tariff function.
The CDR is partial as not all required fields are set as the cdr_from_tariff function
does not know anything about the EVSE location or the token used to authenticate the chargesession.
- See: OCPI spec 2.2.1: CDR.
- See: OCPI spec 2.1.1: Tariff.
Fields§
§currency_code: CodeISO-3166 alpha-2 country code of the CPO that ‘owns’ this CDR.
party_id: Option<CpoId>The five character ID of the CPO that ‘owns’ this CDR.
The first two characters are the ISO-3166 alpha-2 country code of the CPO. The remaining three characters are the ISO-15118 ID of the CPO.
None if a v211 tariff was used to generate the CDR.
The v211 tariff does not define a country code or party_id field.
start_date_time: DateTime<Utc>Start timestamp of the charging session.
end_date_time: DateTime<Utc>End timestamp of the charging session.
total_energy: Option<Kwh>Total energy charged, in kWh.
total_charging_duration: Option<TimeDelta>Total duration charging.
Some if the charging happened during the session.
total_idle_duration: Option<TimeDelta>Total duration not charging.
Some if there was idle time during the session.
total_cost: Option<Price>Total cost of this transaction.
total_energy_cost: Option<Price>Total cost related to the energy dimension.
total_fixed_cost: Option<Price>Total cost of the flat dimension.
total_idle_duration_cost: Option<Price>Total cost related to the idle time dimension.
total_charging_duration_cost: Option<Price>Total cost related to the charging time dimension.
charging_periods: Vec<ChargingPeriod>List of charging periods that make up this charging session. A session should consist of 1 or more periods, where each period has a different relevant Tariff.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PartialCdr
impl RefUnwindSafe for PartialCdr
impl Send for PartialCdr
impl Sync for PartialCdr
impl Unpin for PartialCdr
impl UnsafeUnpin for PartialCdr
impl UnwindSafe for PartialCdr
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoCaveat for T
impl<T> IntoCaveat for T
Source§fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
Caveat<T> by supplying a list of Warnings.Source§fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
FromSchema is infallible a Caveat can be created using this method.