#[non_exhaustive]pub enum ReceiptPolicy {
Ignore,
VerifyIfPresent,
Require,
VerifyAndReport,
}Expand description
How to treat the optional registry_receipt on retrieval
(RFC-ACDP-0010).
#[non_exhaustive] since 0.15.0 (Self::VerifyAndReport was added).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ignore
Skip receipt verification entirely (0.1.0 behavior). The receipt value is still preserved verbatim on the context.
VerifyIfPresent
Verify the receipt when one is present; absence is not an error (the registry may simply be a 0.1.0 registry). Default.
Require
Fail closed unless a receipt is present AND verifies. Use when
the deployment requires audit-grade provenance — registry
claims (ctx_id, created_at, origin_registry) are
assertions, not proofs, without a receipt.
Honored identically by every entry point that accepts a
VerificationPolicy — fetch_with_policy,
fetch_current_with_policy (via LineageHeadPolicy::receipts),
and the fetch_report* family. On
VerifiedContext::fetch_report_diagnose the failure surfaces as
a withheld handle plus VerificationReport::policy_phase_error,
not an Err — see that method’s doc.
VerifyAndReport
Verify the receipt when one is present and report its verdict
separately from the body verdict (RFC-ACDP-0010 §8, 0.5.0 — the
acdp-consumer “receipt verdict reported separately” rule). A
failing receipt does not fail retrieval: it is recorded in
VerifiedContext::receipt_verdict /
VerificationReport::receipt_verdict and then treated exactly
as an absent one by every rule that consumes receipt-attested
facts — the RFC-ACDP-0010 §10 historical-key rule does not apply,
an RFC-ACDP-0014 §7 revoked-key context is unplaceable (fails
closed), and lineage_id is reported
LineageBinding::Unbound. The
body is never presented as receipt-attested
(VerifiedContext::verified_receipt is None).
On /current the same applies to the lineage-head receipt under
LineageHeadPolicy::receipts
(VerifiedContext::head_receipt_verdict).
Trait Implementations§
Source§impl Clone for ReceiptPolicy
impl Clone for ReceiptPolicy
impl Copy for ReceiptPolicy
Source§impl Debug for ReceiptPolicy
impl Debug for ReceiptPolicy
Source§impl Default for ReceiptPolicy
impl Default for ReceiptPolicy
impl Eq for ReceiptPolicy
Source§impl PartialEq for ReceiptPolicy
impl PartialEq for ReceiptPolicy
impl StructuralPartialEq for ReceiptPolicy
Auto Trait Implementations§
impl Freeze for ReceiptPolicy
impl RefUnwindSafe for ReceiptPolicy
impl Send for ReceiptPolicy
impl Sync for ReceiptPolicy
impl Unpin for ReceiptPolicy
impl UnsafeUnpin for ReceiptPolicy
impl UnwindSafe for ReceiptPolicy
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> 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.