Skip to main content

CsResponse

Enum CsResponse 

Source
#[non_exhaustive]
pub enum CsResponse {
Show 36 variants Authorize(AuthorizeResponse), BatterySwap(BatterySwapResponse), BootNotification(BootNotificationResponse), ClearedChargingLimit(ClearedChargingLimitResponse), ClosePeriodicEventStream(ClosePeriodicEventStreamResponse), DataTransfer(DataTransferResponse), FirmwareStatusNotification(FirmwareStatusNotificationResponse), Get15118EVCertificate(Get15118EVCertificateResponse), GetCertificateChainStatus(GetCertificateChainStatusResponse), GetCertificateStatus(GetCertificateStatusResponse), Heartbeat(HeartbeatResponse), LogStatusNotification(LogStatusNotificationResponse), MeterValues(MeterValuesResponse), NotifyChargingLimit(NotifyChargingLimitResponse), NotifyCustomerInformation(NotifyCustomerInformationResponse), NotifyDERAlarm(NotifyDERAlarmResponse), NotifyDERStartStop(NotifyDERStartStopResponse), NotifyDisplayMessages(NotifyDisplayMessagesResponse), NotifyEVChargingNeeds(NotifyEVChargingNeedsResponse), NotifyEVChargingSchedule(NotifyEVChargingScheduleResponse), NotifyEvent(NotifyEventResponse), NotifyMonitoringReport(NotifyMonitoringReportResponse), NotifyPriorityCharging(NotifyPriorityChargingResponse), NotifyReport(NotifyReportResponse), NotifySettlement(NotifySettlementResponse), OpenPeriodicEventStream(OpenPeriodicEventStreamResponse), PublishFirmwareStatusNotification(PublishFirmwareStatusNotificationResponse), PullDynamicScheduleUpdate(PullDynamicScheduleUpdateResponse), ReportChargingProfiles(ReportChargingProfilesResponse), ReportDERControl(ReportDERControlResponse), ReservationStatusUpdate(ReservationStatusUpdateResponse), SecurityEventNotification(SecurityEventNotificationResponse), SignCertificate(SignCertificateResponse), StatusNotification(StatusNotificationResponse), TransactionEvent(TransactionEventResponse), VatNumberValidation(VatNumberValidationResponse),
}
Expand description

The CSMS’s answer to a CsRequest (CSMS → CS) in OCPP 2.1.

SEND-only actions have no response and are therefore absent from this enum.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Authorize(AuthorizeResponse)

Authorize.

§

BatterySwap(BatterySwapResponse)

BatterySwap.

§

BootNotification(BootNotificationResponse)

BootNotification.

§

ClearedChargingLimit(ClearedChargingLimitResponse)

ClearedChargingLimit.

§

ClosePeriodicEventStream(ClosePeriodicEventStreamResponse)

ClosePeriodicEventStream.

§

DataTransfer(DataTransferResponse)

DataTransfer.

§

FirmwareStatusNotification(FirmwareStatusNotificationResponse)

FirmwareStatusNotification.

§

Get15118EVCertificate(Get15118EVCertificateResponse)

Get15118EVCertificate.

§

GetCertificateChainStatus(GetCertificateChainStatusResponse)

GetCertificateChainStatus.

§

GetCertificateStatus(GetCertificateStatusResponse)

GetCertificateStatus.

§

Heartbeat(HeartbeatResponse)

Heartbeat.

§

LogStatusNotification(LogStatusNotificationResponse)

LogStatusNotification.

§

MeterValues(MeterValuesResponse)

MeterValues.

§

NotifyChargingLimit(NotifyChargingLimitResponse)

NotifyChargingLimit.

§

NotifyCustomerInformation(NotifyCustomerInformationResponse)

NotifyCustomerInformation.

§

NotifyDERAlarm(NotifyDERAlarmResponse)

NotifyDERAlarm.

§

NotifyDERStartStop(NotifyDERStartStopResponse)

NotifyDERStartStop.

§

NotifyDisplayMessages(NotifyDisplayMessagesResponse)

NotifyDisplayMessages.

§

NotifyEVChargingNeeds(NotifyEVChargingNeedsResponse)

NotifyEVChargingNeeds.

§

NotifyEVChargingSchedule(NotifyEVChargingScheduleResponse)

NotifyEVChargingSchedule.

§

NotifyEvent(NotifyEventResponse)

NotifyEvent.

§

NotifyMonitoringReport(NotifyMonitoringReportResponse)

NotifyMonitoringReport.

§

NotifyPriorityCharging(NotifyPriorityChargingResponse)

NotifyPriorityCharging.

§

NotifyReport(NotifyReportResponse)

NotifyReport.

§

NotifySettlement(NotifySettlementResponse)

NotifySettlement.

§

OpenPeriodicEventStream(OpenPeriodicEventStreamResponse)

OpenPeriodicEventStream.

§

PublishFirmwareStatusNotification(PublishFirmwareStatusNotificationResponse)

PublishFirmwareStatusNotification.

§

PullDynamicScheduleUpdate(PullDynamicScheduleUpdateResponse)

PullDynamicScheduleUpdate.

§

ReportChargingProfiles(ReportChargingProfilesResponse)

ReportChargingProfiles.

§

ReportDERControl(ReportDERControlResponse)

ReportDERControl.

§

ReservationStatusUpdate(ReservationStatusUpdateResponse)

ReservationStatusUpdate.

§

SecurityEventNotification(SecurityEventNotificationResponse)

SecurityEventNotification.

§

SignCertificate(SignCertificateResponse)

SignCertificate.

§

StatusNotification(StatusNotificationResponse)

StatusNotification.

§

TransactionEvent(TransactionEventResponse)

TransactionEvent.

§

VatNumberValidation(VatNumberValidationResponse)

VatNumberValidation.

Implementations§

Source§

impl CsResponse

Source

pub const fn action(&self) -> Action

The action this payload belongs to.

Source

pub fn decode( action: Action, payload: &RawValue, options: &DecodeOptions, ) -> Result<Self, DecodeError>

Decodes a raw JSON payload for action, classifying every failure so the caller can answer with the correct OCPP error code.

Source

pub fn to_json(&self) -> Result<String, Error>

Serializes the payload object (without the OCPP-J frame).

Trait Implementations§

Source§

impl Clone for CsResponse

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CsResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CsResponse

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CsResponse

Source§

fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CsResponse

Source§

impl Validate for CsResponse

Source§

fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)

Appends this value’s violations to out, relative to path.
Source§

fn validate(&self) -> Result<(), Violations>

Validates this value from the payload root.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.