#[non_exhaustive]pub enum IdentificationLevel<'a> {
None,
Hearsay,
Trusted,
Verified,
Certified,
Secure,
Mismatch,
Invalid,
Outdated,
Unknown,
Other(&'a str),
}Expand description
Overall status of the user assignment [OCMF Tab. 11].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
NONE — no user assignment; the other user fields mean nothing.
Hearsay
HEARSAY — unsecured, e.g. a plain RFID UID.
Trusted
TRUSTED — trustworthy but not absolutely reliable, e.g. backend
authorisation.
Verified
VERIFIED — verified by the signature component and special measures.
Certified
CERTIFIED — verified by a cryptographic signature certifying the
assignment.
Secure
SECURE — established by a secure feature, e.g. Plug & Charge.
Mismatch
MISMATCH — error: UIDs do not match.
Invalid
INVALID — error: certificate check negative.
Outdated
OUTDATED — error: referenced trust certificate expired.
Unknown
UNKNOWN — no matching trust certificate found.
Other(&'a str)
A value the table does not define.
Implementations§
Source§impl<'a> IdentificationLevel<'a>
impl<'a> IdentificationLevel<'a>
Sourcepub fn parse_decoded(s: &RawStr<'a>) -> Self
pub fn parse_decoded(s: &RawStr<'a>) -> Self
Reads a level 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. 11] defines this level.
Sourcepub const fn is_error(&self) -> bool
pub const fn is_error(&self) -> bool
Whether this level reports an error in the assignment.
The reference verifier refuses a transaction whose level is one of
MISMATCH, INVALID, OUTDATED or UNKNOWN, and so does
crate::session.