pub struct CdrLocation {Show 15 fields
pub id: CiString<36>,
pub name: Option<OcpiString<255>>,
pub address: OcpiString<45>,
pub city: OcpiString<45>,
pub postal_code: Option<OcpiString<10>>,
pub state: Option<OcpiString<20>>,
pub country: OcpiString<3>,
pub coordinates: GeoLocation,
pub evse_uid: CiString<36>,
pub evse_id: EvseId,
pub connector_id: CiString<36>,
pub connector_standard: ConnectorType,
pub connector_format: ConnectorFormat,
pub connector_power_type: PowerType,
pub extensions: Extensions,
}v2_3_0 only.Expand description
The parts of a Location that a CDR needs, frozen at the start of the session.
Spec: 2.3.0 §mod_cdrs_cdr_location_class
Fields§
§id: CiString<36>Uniquely identifies the location within the CPO’s platform.
name: Option<OcpiString<255>>Display name of the location.
address: OcpiString<45>Street/block name and house number if available.
city: OcpiString<45>City or town.
postal_code: Option<OcpiString<10>>Postal code of the location.
state: Option<OcpiString<20>>State, only to be used when relevant.
country: OcpiString<3>ISO 3166-1 alpha-3 code for the country of this location.
coordinates: GeoLocationCoordinates of the location.
evse_uid: CiString<36>The EVSE’s technical identifier. May be #NA for a reservation that never charged.
evse_id: EvseIdThe EVSE’s human-readable ID. May be #NA for a reservation that never charged.
connector_id: CiString<36>Identifier of the connector within the EVSE. May be #NA.
connector_standard: ConnectorTypeThe standard of the installed connector.
connector_format: ConnectorFormatThe format (socket/cable) of the installed connector.
connector_power_type: PowerTypeWhether the connector supplies AC or DC, and on how many phases.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl CdrLocation
impl CdrLocation
Sourcepub fn builder() -> CdrLocationBuilder
pub fn builder() -> CdrLocationBuilder
Create an instance of CdrLocation using the builder syntax
Source§impl CdrLocation
impl CdrLocation
Sourcepub fn is_reservation_only(&self) -> bool
pub fn is_reservation_only(&self) -> bool
Whether this CDR records a reservation that never became a charging session.
The spec marks evse_uid, evse_id and connector_id as “allowed to be set to #NA
when this CDR is created for a reservation that never resulted in a charging session”,
in which case the connector fields “can be set to any value and should be ignored”.
Trait Implementations§
Source§impl Clone for CdrLocation
impl Clone for CdrLocation
Source§fn clone(&self) -> CdrLocation
fn clone(&self) -> CdrLocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CdrLocation
impl Debug for CdrLocation
Source§impl<'de> Deserialize<'de> for CdrLocation
impl<'de> Deserialize<'de> for CdrLocation
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>,
Source§impl Downgrade<CdrLocation> for CdrLocation
Available on crate feature convert only.
impl Downgrade<CdrLocation> for CdrLocation
convert only.Source§fn downgrade(self) -> Converted<CdrLocation>
fn downgrade(self) -> Converted<CdrLocation>
Source§impl JsonSchema for CdrLocation
impl JsonSchema for CdrLocation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for CdrLocation
impl PartialEq for CdrLocation
Source§impl Serialize for CdrLocation
impl Serialize for CdrLocation
impl StructuralPartialEq for CdrLocation
Source§impl Upgrade<CdrLocation> for CdrLocation
Available on crate feature convert only.
impl Upgrade<CdrLocation> for CdrLocation
convert only.