#[non_exhaustive]pub struct SourcedRevocation {
pub revoked_key_fingerprint: String,
pub compromised_since: DateTime<Utc>,
pub ctx_id: Option<CtxId>,
pub issuer: AgentDid,
pub revoked_key_controller: AgentDid,
pub trust_class: RevocationTrustClass,
pub source: RevocationSource,
}Expand description
A verified revocation, attributed (RFC-ACDP-0014 §7 “Attribution”, 0.5.0): which context it is, who signed it, its trust class, which producer’s key it names, and where the consumer got it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.revoked_key_fingerprint: StringRFC-ACDP-0010 §6 fingerprint of the revoked key.
compromised_since: DateTime<Utc>This revocation’s compromise boundary T (the effective boundary
across a lineage is RevocationRefusal::boundary).
ctx_id: Option<CtxId>The revocation context’s ctx_id, when known. None only for a
caller-supplied revocation built from a publish request.
Registry-assigned — identifies, does not authenticate.
issuer: AgentDidThe revocation’s signer (body.agent_id): the producer for the
producer-signed class, the registry for the registry-attested one.
revoked_key_controller: AgentDidmetadata.revoked_key_controller (defaults to issuer).
trust_class: RevocationTrustClass§5/§6 trust class.
source: RevocationSourceWhere the consumer obtained it.
Implementations§
Source§impl SourcedRevocation
impl SourcedRevocation
Sourcepub fn new(
revoked_key_fingerprint: String,
compromised_since: DateTime<Utc>,
ctx_id: Option<CtxId>,
issuer: AgentDid,
revoked_key_controller: AgentDid,
trust_class: RevocationTrustClass,
source: RevocationSource,
) -> SourcedRevocation
pub fn new( revoked_key_fingerprint: String, compromised_since: DateTime<Utc>, ctx_id: Option<CtxId>, issuer: AgentDid, revoked_key_controller: AgentDid, trust_class: RevocationTrustClass, source: RevocationSource, ) -> SourcedRevocation
Assemble an attributed revocation. acdp-client builds these from
verified KeyRevocations; there is no other sound source.
Sourcepub fn speaks_for(&self, producer: &AgentDid) -> bool
pub fn speaks_for(&self, producer: &AgentDid) -> bool
Whether this revocation speaks for producer (RFC-ACDP-0014 §7
“Producer scope”, 0.5.0): producer-signed ⇒ issuer == producer;
registry-attested ⇒ revoked_key_controller == producer (§6
vantage scoping is applied separately). A revocation outside this
scope MUST NOT change the producer’s verdict; it is a hint only.
Trait Implementations§
Source§impl Clone for SourcedRevocation
impl Clone for SourcedRevocation
Source§fn clone(&self) -> SourcedRevocation
fn clone(&self) -> SourcedRevocation
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 SourcedRevocation
impl Debug for SourcedRevocation
Source§impl<'de> Deserialize<'de> for SourcedRevocation
impl<'de> Deserialize<'de> for SourcedRevocation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SourcedRevocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SourcedRevocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SourcedRevocation
Source§impl PartialEq for SourcedRevocation
impl PartialEq for SourcedRevocation
Source§impl Serialize for SourcedRevocation
impl Serialize for SourcedRevocation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SourcedRevocation
Auto Trait Implementations§
impl Freeze for SourcedRevocation
impl RefUnwindSafe for SourcedRevocation
impl Send for SourcedRevocation
impl Sync for SourcedRevocation
impl Unpin for SourcedRevocation
impl UnsafeUnpin for SourcedRevocation
impl UnwindSafe for SourcedRevocation
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,
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.