#[non_exhaustive]pub enum ChargingState {
EVConnected,
Charging,
SuspendedEV,
SuspendedEVSE,
Idle,
UnknownValue(String),
}Expand description
Current charging state, is required when state has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
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.
EVConnected
EVConnected.
Charging
Charging.
SuspendedEV
SuspendedEV.
SuspendedEVSE
SuspendedEVSE.
Idle
Idle.
UnknownValue(String)
A value that this version of OCPP does not define.
Produced instead of failing, so a peer’s forward-compatible extension does not
take down the connection. Reported by
Validate as
ViolationKind::UnknownEnumValue,
which the decoder turns into a PropertyConstraintViolation unless
UnknownEnumValues::Preserve is set.
Named UnknownValue because Unknown is itself a defined value of several
OCPP enumerations.
Implementations§
Trait Implementations§
Source§impl Clone for ChargingState
impl Clone for ChargingState
Source§impl Debug for ChargingState
impl Debug for ChargingState
Source§impl<'de> Deserialize<'de> for ChargingState
impl<'de> Deserialize<'de> for ChargingState
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ChargingState
impl Display for ChargingState
impl Eq for ChargingState
Source§impl FromStr for ChargingState
impl FromStr for ChargingState
Source§impl Hash for ChargingState
impl Hash for ChargingState
Source§impl Ord for ChargingState
impl Ord for ChargingState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ChargingState
impl PartialEq for ChargingState
Source§impl PartialOrd for ChargingState
impl PartialOrd for ChargingState
Source§impl Serialize for ChargingState
impl Serialize for ChargingState
impl StructuralPartialEq for ChargingState
Source§impl Validate for ChargingState
impl Validate for ChargingState
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Forget for ChargingState
impl Freeze for ChargingState
impl Move for ChargingState
impl RefUnwindSafe for ChargingState
impl Send for ChargingState
impl Sync for ChargingState
impl Unpin for ChargingState
impl UnsafeUnpin for ChargingState
impl UnwindSafe for ChargingState
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