#[non_exhaustive]pub enum MessageState {
Charging,
Faulted,
Idle,
Unavailable,
Suspended,
Discharging,
UnknownValue(String),
}Expand description
If provided the Charging Station shall return Display Messages with the given state only.
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.
Charging
Charging.
Faulted
Faulted.
Idle
Idle.
Unavailable.
Suspended
Suspended.
Discharging
Discharging.
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 MessageState
impl Clone for MessageState
Source§fn clone(&self) -> MessageState
fn clone(&self) -> MessageState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageState
impl Debug for MessageState
Source§impl<'de> Deserialize<'de> for MessageState
impl<'de> Deserialize<'de> for MessageState
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 MessageState
impl Display for MessageState
impl Eq for MessageState
Source§impl FromStr for MessageState
impl FromStr for MessageState
Source§impl Hash for MessageState
impl Hash for MessageState
Source§impl Ord for MessageState
impl Ord for MessageState
Source§fn cmp(&self, other: &MessageState) -> Ordering
fn cmp(&self, other: &MessageState) -> Ordering
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 MessageState
impl PartialEq for MessageState
Source§impl PartialOrd for MessageState
impl PartialOrd for MessageState
Source§impl Serialize for MessageState
impl Serialize for MessageState
impl StructuralPartialEq for MessageState
Source§impl Validate for MessageState
impl Validate for MessageState
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 Freeze for MessageState
impl RefUnwindSafe for MessageState
impl Send for MessageState
impl Sync for MessageState
impl Unpin for MessageState
impl UnsafeUnpin for MessageState
impl UnwindSafe for MessageState
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