#[non_exhaustive]pub enum OCPPVersion {
OCPP12,
OCPP15,
OCPP16,
OCPP20,
OCPP201,
OCPP21,
UnknownValue(String),
}Expand description
(2.1) This field is ignored, since the OCPP version to use is determined during the websocket handshake. The field is only kept for backwards compatibility with the OCPP 2.0.1 JSON schema.
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.
OCPP12
OCPP12.
OCPP15
OCPP15.
OCPP16
OCPP16.
OCPP20
OCPP20.
OCPP201
OCPP201.
OCPP21
OCPP21.
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 OCPPVersion
impl Clone for OCPPVersion
Source§impl Debug for OCPPVersion
impl Debug for OCPPVersion
Source§impl<'de> Deserialize<'de> for OCPPVersion
impl<'de> Deserialize<'de> for OCPPVersion
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 OCPPVersion
impl Display for OCPPVersion
impl Eq for OCPPVersion
Source§impl FromStr for OCPPVersion
impl FromStr for OCPPVersion
Source§impl Hash for OCPPVersion
impl Hash for OCPPVersion
Source§impl Ord for OCPPVersion
impl Ord for OCPPVersion
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 OCPPVersion
impl PartialEq for OCPPVersion
Source§impl PartialOrd for OCPPVersion
impl PartialOrd for OCPPVersion
Source§impl Serialize for OCPPVersion
impl Serialize for OCPPVersion
impl StructuralPartialEq for OCPPVersion
Source§impl Validate for OCPPVersion
impl Validate for OCPPVersion
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 OCPPVersion
impl Freeze for OCPPVersion
impl Move for OCPPVersion
impl RefUnwindSafe for OCPPVersion
impl Send for OCPPVersion
impl Sync for OCPPVersion
impl Unpin for OCPPVersion
impl UnsafeUnpin for OCPPVersion
impl UnwindSafe for OCPPVersion
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