#[non_exhaustive]pub enum AuthMethod {
AuthRequest,
Whitelist,
Custom(String),
}v2_1_1 only.Expand description
How the driver was authenticated, in OCPI 2.1.1.
COMMAND — the session was started by a remote command — arrived in OCPI 2.2.
Spec: 2.1.1 §mod_cdrs_authmethod_enum
The specification declares this enum closed. This crate still decodes an
unrecognised value into Custom rather than failing the whole
object, and Validate reports it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AuthRequest
An authentication request was sent to the eMSP.
Wire value: AUTH_REQUEST
Whitelist
A whitelist was used; no request to the eMSP was performed.
Wire value: WHITELIST
Custom(String)
A value this version of the specification does not define, preserved verbatim.
The variant is named Custom rather than Other because several OCPI OpenEnums
have a defined value that is literally OTHER.
Implementations§
Source§impl AuthMethod
impl AuthMethod
Sourcepub const ALL_KNOWN: &'static [Self]
pub const ALL_KNOWN: &'static [Self]
Every value this version of the specification defines, in declaration order.
Sourcepub const ALL_KNOWN_WIRE: &'static [&'static str]
pub const ALL_KNOWN_WIRE: &'static [&'static str]
Every wire value this version of the specification defines.
Sourcepub fn from_str_ignore_case(s: &str) -> Self
pub fn from_str_ignore_case(s: &str) -> Self
Parses a wire value, ignoring ASCII case for the known values.
For peers that get the case wrong; FromStr is strict.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthMethod
impl Debug for AuthMethod
Source§impl<'de> Deserialize<'de> for AuthMethod
impl<'de> Deserialize<'de> for AuthMethod
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 AuthMethod
impl Display for AuthMethod
impl Eq for AuthMethod
Source§impl From<&str> for AuthMethod
impl From<&str> for AuthMethod
Source§impl FromStr for AuthMethod
impl FromStr for AuthMethod
Source§impl Hash for AuthMethod
impl Hash for AuthMethod
Source§impl JsonSchema for AuthMethod
impl JsonSchema for AuthMethod
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 AuthMethod
impl Ord for AuthMethod
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 AuthMethod
impl PartialEq for AuthMethod
Source§impl PartialOrd for AuthMethod
impl PartialOrd for AuthMethod
Source§impl Serialize for AuthMethod
impl Serialize for AuthMethod
Source§impl Validate for AuthMethod
impl Validate for AuthMethod
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnsafeUnpin for AuthMethod
impl UnwindSafe for AuthMethod
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.