#[non_exhaustive]pub enum LogInclusionVerdict {
Included(Box<LogInclusion>),
CannotVerify(CannotVerifyReason),
Invalid(AcdpError),
}Expand description
The RFC-ACDP-0012 §9 log-inclusion verdict, reported separately from the body, receipt and revocation verdicts (§9.3).
Three outcomes, never conflated:
Self::Included: the proof verified against a leaf rebuilt from verified material. Only this one means “logged”.Self::CannotVerify: the proof could not be checked, because no verified receipt was available to rebuild the leaf from (spec #78 L1). It is neither logged norinvalid_log_proof, and it is not evidence of a log violation. An echoedleafmember is never used instead.Self::Invalid: the proof was checked and failed (invalid_log_proof).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Included(Box<LogInclusion>)
The proof verified. Keep the checkpoint to check consistency with later ones (RFC-ACDP-0012 §9.2).
CannotVerify(CannotVerifyReason)
The proof could not be checked.
Invalid(AcdpError)
The proof was checked and failed (AcdpError::InvalidLogProof,
or a transport error while resolving the registry key).
Implementations§
Source§impl LogInclusionVerdict
impl LogInclusionVerdict
Sourcepub fn is_included(&self) -> bool
pub fn is_included(&self) -> bool
true only for Self::Included.
Sourcepub fn inclusion(&self) -> Option<&LogInclusion>
pub fn inclusion(&self) -> Option<&LogInclusion>
The verified proof, for Self::Included.
Sourcepub fn cannot_verify_reason(&self) -> Option<CannotVerifyReason>
pub fn cannot_verify_reason(&self) -> Option<CannotVerifyReason>
The reason, for Self::CannotVerify.
Sourcepub fn error(&self) -> Option<&AcdpError>
pub fn error(&self) -> Option<&AcdpError>
The failure, for Self::Invalid.
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The report token: included, cannot_verify,
invalid_log_proof, or error for an Self::Invalid that is not
a proof failure (for example an unreachable registry DID document;
see AcdpError::is_transient).
Trait Implementations§
Source§impl Clone for LogInclusionVerdict
impl Clone for LogInclusionVerdict
Auto Trait Implementations§
impl Freeze for LogInclusionVerdict
impl RefUnwindSafe for LogInclusionVerdict
impl Send for LogInclusionVerdict
impl Sync for LogInclusionVerdict
impl Unpin for LogInclusionVerdict
impl UnsafeUnpin for LogInclusionVerdict
impl UnwindSafe for LogInclusionVerdict
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