#[non_exhaustive]pub enum UnitOfMeasure {
Show 19 variants
A,
Celcius,
Celsius,
Fahrenheit,
Hertz,
K,
Percent,
V,
VA,
W,
Wh,
KVA,
KW,
KWh,
Kvar,
Kvarh,
Var,
Varh,
UnknownValue(String),
}Expand description
The OCPP 1.6 UnitOfMeasure enumeration.
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.
A
A.
Celcius
Celcius.
Celsius
Celsius.
Fahrenheit
Fahrenheit.
Hertz
Hertz.
K
K.
Percent
Percent.
V
V.
VA
VA.
W
W.
Wh
Wh.
KVA
kVA.
KW
kW.
KWh
kWh.
Kvar
kvar.
Kvarh
kvarh.
Var
var.
Varh
varh.
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 UnitOfMeasure
impl Clone for UnitOfMeasure
Source§fn clone(&self) -> UnitOfMeasure
fn clone(&self) -> UnitOfMeasure
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 UnitOfMeasure
impl Debug for UnitOfMeasure
Source§impl<'de> Deserialize<'de> for UnitOfMeasure
impl<'de> Deserialize<'de> for UnitOfMeasure
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 UnitOfMeasure
impl Display for UnitOfMeasure
impl Eq for UnitOfMeasure
Source§impl FromStr for UnitOfMeasure
impl FromStr for UnitOfMeasure
Source§impl Hash for UnitOfMeasure
impl Hash for UnitOfMeasure
Source§impl Ord for UnitOfMeasure
impl Ord for UnitOfMeasure
Source§fn cmp(&self, other: &UnitOfMeasure) -> Ordering
fn cmp(&self, other: &UnitOfMeasure) -> 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 UnitOfMeasure
impl PartialEq for UnitOfMeasure
Source§impl PartialOrd for UnitOfMeasure
impl PartialOrd for UnitOfMeasure
Source§impl Serialize for UnitOfMeasure
impl Serialize for UnitOfMeasure
impl StructuralPartialEq for UnitOfMeasure
Source§impl Validate for UnitOfMeasure
impl Validate for UnitOfMeasure
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 UnitOfMeasure
impl RefUnwindSafe for UnitOfMeasure
impl Send for UnitOfMeasure
impl Sync for UnitOfMeasure
impl Unpin for UnitOfMeasure
impl UnsafeUnpin for UnitOfMeasure
impl UnwindSafe for UnitOfMeasure
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