pub enum CredentialRole {
AuthorisedRepairer,
Recycler,
Remanufacturer,
PreparerForReuse,
Distributor,
MarketSurveillanceAuthority,
CustomsAuthority,
NotifiedBody,
Custom(String),
}Expand description
The access role granted by a Verifiable Credential.
Maps to the ESPR access tiers and the specific operator roles defined in the transfer-of-responsibility model.
Variants§
AuthorisedRepairer
Authorised repairer — can access disassembly instructions, spare parts info.
Recycler
Recycler — can access material composition, SVHC data, recycling instructions.
Remanufacturer
Remanufacturer — can access full technical specifications.
PreparerForReuse
Preparer for reuse — can access quality and safety data.
Distributor
Distributor with professional access.
MarketSurveillanceAuthority
Market surveillance authority — full access to all tiers.
CustomsAuthority
Customs authority — access for border control.
NotifiedBody
Notified body — conformity assessment.
Custom(String)
Custom role (extension point for sector-specific roles).
Implementations§
Source§impl CredentialRole
impl CredentialRole
Sourcepub fn access_tier(&self) -> AccessTier
pub fn access_tier(&self) -> AccessTier
Returns the minimum access tier this role grants.
Trait Implementations§
Source§impl Clone for CredentialRole
impl Clone for CredentialRole
Source§fn clone(&self) -> CredentialRole
fn clone(&self) -> CredentialRole
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CredentialRole
impl Debug for CredentialRole
Source§impl<'de> Deserialize<'de> for CredentialRole
impl<'de> Deserialize<'de> for CredentialRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CredentialRole
Source§impl Hash for CredentialRole
impl Hash for CredentialRole
Source§impl PartialEq for CredentialRole
impl PartialEq for CredentialRole
Source§fn eq(&self, other: &CredentialRole) -> bool
fn eq(&self, other: &CredentialRole) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CredentialRole
impl Serialize for CredentialRole
impl StructuralPartialEq for CredentialRole
Auto Trait Implementations§
impl Freeze for CredentialRole
impl RefUnwindSafe for CredentialRole
impl Send for CredentialRole
impl Sync for CredentialRole
impl Unpin for CredentialRole
impl UnsafeUnpin for CredentialRole
impl UnwindSafe for CredentialRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.