pub struct ProviderId { /* private fields */ }Expand description
Identifies an e-Mobility Provider. Assigned by Hubject.
Spec pattern: ^([A-Za-z]{2}\-?[A-Za-z0-9]{3}|[A-Za-z]{2}[\*|-]?[A-Za-z0-9]{3})$
DE8EO, DE-8EO, DE*8EO are the same provider.
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 ProviderId
impl ProviderId
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 ProviderId
impl Clone for ProviderId
Source§impl Debug for ProviderId
impl Debug for ProviderId
Source§impl<'de> Deserialize<'de> for ProviderId
impl<'de> Deserialize<'de> for ProviderId
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 ProviderId
impl Display for ProviderId
impl Eq for ProviderId
Source§impl From<ProviderId> for ProviderIdOrAll
impl From<ProviderId> for ProviderIdOrAll
Source§fn from(id: ProviderId) -> Self
fn from(id: ProviderId) -> Self
Source§impl From<ProviderId> for PathId
Available on crate feature transport only.
impl From<ProviderId> for PathId
transport only.Source§fn from(id: ProviderId) -> Self
fn from(id: ProviderId) -> Self
Source§impl FromStr for ProviderId
impl FromStr for ProviderId
Source§impl Hash for ProviderId
impl Hash for ProviderId
Source§impl JsonSchema for ProviderId
Available on crate feature schema only.
impl JsonSchema for ProviderId
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 ProviderId
impl Ord for ProviderId
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 ProviderId
impl PartialEq for ProviderId
Source§impl PartialOrd for ProviderId
impl PartialOrd for ProviderId
Source§impl Serialize for ProviderId
impl Serialize for ProviderId
Source§impl Validate for ProviderId
impl Validate for ProviderId
Auto Trait Implementations§
impl Freeze for ProviderId
impl RefUnwindSafe for ProviderId
impl Send for ProviderId
impl Sync for ProviderId
impl Unpin for ProviderId
impl UnsafeUnpin for ProviderId
impl UnwindSafe for ProviderId
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.