pub struct OperatorId { /* private fields */ }Expand description
Identifies a Charge Point Operator, including its country code.
Spec pattern: ^(([A-Za-z]{2}\*?[A-Za-z0-9]{3})|(\+?[0-9]{1,3}\*[0-9]{3}))$
ISO: DE*A36, DEA36. DIN: +49*536.
This is the value Hubject matches against the partner’s TLS client certificate when it appears in a URL path, which is why it is never rewritten on the way out.
Implementations§
Source§impl OperatorId
impl OperatorId
Sourcepub fn new_unchecked(value: impl Into<String>) -> Self
pub fn new_unchecked(value: impl Into<String>) -> Self
Accepts value without checking the grammar.
For decoding a peer’s payload, where a malformed id must arrive and be reported by
Validate rather than break the whole page. standard is a best guess; the
value is reported by Validate::validate either way.
Sourcepub const fn standard(&self) -> IdStandard
pub const fn standard(&self) -> IdStandard
Which standard this identifier follows.
Sourcepub fn canonical(&self) -> String
pub fn canonical(&self) -> String
The identifier with every optional separator removed, upper-cased.
Use this as a database key. Never put it on the wire: Hubject matches identifiers against the TLS client certificate as text.
Sourcepub fn is_well_formed(&self) -> bool
pub fn is_well_formed(&self) -> bool
Whether this value satisfies the specification’s grammar.
Trait Implementations§
Source§impl Clone for OperatorId
impl Clone for OperatorId
Source§impl Debug for OperatorId
impl Debug for OperatorId
Source§impl<'de> Deserialize<'de> for OperatorId
impl<'de> Deserialize<'de> for OperatorId
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Display for OperatorId
impl Display for OperatorId
impl Eq for OperatorId
Source§impl From<OperatorId> for PathId
Available on crate feature transport only.
impl From<OperatorId> for PathId
transport only.Source§fn from(id: OperatorId) -> Self
fn from(id: OperatorId) -> Self
Source§impl FromStr for OperatorId
impl FromStr for OperatorId
Source§impl Hash for OperatorId
impl Hash for OperatorId
Source§impl JsonSchema for OperatorId
Available on crate feature schema only.
impl JsonSchema for OperatorId
schema only.Source§fn json_schema(_g: &mut SchemaGenerator) -> Schema
fn json_schema(_g: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for OperatorId
impl Ord for OperatorId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OperatorId
impl PartialEq for OperatorId
Source§impl PartialOrd for OperatorId
impl PartialOrd for OperatorId
Source§impl Serialize for OperatorId
impl Serialize for OperatorId
Source§impl Validate for OperatorId
impl Validate for OperatorId
Auto Trait Implementations§
impl Freeze for OperatorId
impl RefUnwindSafe for OperatorId
impl Send for OperatorId
impl Sync for OperatorId
impl Unpin for OperatorId
impl UnsafeUnpin for OperatorId
impl UnwindSafe for OperatorId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.