#[non_exhaustive]pub enum ChargePointIdType<'a> {
EvseId,
ChargeBoxAndConnector,
Other(&'a str),
}Expand description
How a charge point is identified [OCMF Tab. 18].
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.
EvseId
EVSEID.
ChargeBoxAndConnector
CBIDC — charge box ID and connector ID, space separated.
Other(&'a str)
A value the table does not define.
Implementations§
Source§impl<'a> ChargePointIdType<'a>
impl<'a> ChargePointIdType<'a>
Sourcepub fn parse_decoded(s: &RawStr<'a>) -> Self
pub fn parse_decoded(s: &RawStr<'a>) -> Self
Reads a type from a JSON string, matching the table on its decoded value.
Sourcepub fn from_parts(decoded: &str, raw: &'a str) -> Self
pub fn from_parts(decoded: &str, raw: &'a str) -> Self
Reads a value whose decoded form and source text are already in hand.
The two differ when the source used a \uXXXX escape, and — for a
field a real record wrote as a JSON number — when there was no string
to decode at all.
Sourcepub const fn is_defined(&self) -> bool
pub const fn is_defined(&self) -> bool
Whether [OCMF Tab. 18] defines this type.
Sourcepub fn id_is_well_formed(&self, id: &str) -> Option<bool>
pub fn id_is_well_formed(&self, id: &str) -> Option<bool>
Whether id has the shape this type prescribes for CI
[OCMF Tab. 18].
None for EVSEID, whose format the table leaves to the EVSE ID
specification rather than stating.
Trait Implementations§
Source§impl<'a> Clone for ChargePointIdType<'a>
impl<'a> Clone for ChargePointIdType<'a>
impl<'a> Copy for ChargePointIdType<'a>
Source§impl<'a> Debug for ChargePointIdType<'a>
impl<'a> Debug for ChargePointIdType<'a>
Source§impl Display for ChargePointIdType<'_>
impl Display for ChargePointIdType<'_>
impl<'a> Eq for ChargePointIdType<'a>
Source§impl<'a> Hash for ChargePointIdType<'a>
impl<'a> Hash for ChargePointIdType<'a>
Source§impl<'a> PartialEq for ChargePointIdType<'a>
impl<'a> PartialEq for ChargePointIdType<'a>
impl<'a> StructuralPartialEq for ChargePointIdType<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChargePointIdType<'a>
impl<'a> RefUnwindSafe for ChargePointIdType<'a>
impl<'a> Send for ChargePointIdType<'a>
impl<'a> Sync for ChargePointIdType<'a>
impl<'a> Unpin for ChargePointIdType<'a>
impl<'a> UnsafeUnpin for ChargePointIdType<'a>
impl<'a> UnwindSafe for ChargePointIdType<'a>
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