#[non_exhaustive]pub enum VerifyPolicy {
RequireAll,
RequireAny,
RequireThreshold(usize),
}Expand description
Acceptance rule for verify_multi.
§Examples
ⓘ
use affinidi_data_integrity::multi::VerifyPolicy;
// Every proof must verify:
let strict = VerifyPolicy::RequireAll;
// At least three of N witnesses must verify:
let quorum = VerifyPolicy::RequireThreshold(3);
// Hybrid classical+PQC: accept if *any* proof verifies (client picks
// the strongest proof it understands):
let hybrid = VerifyPolicy::RequireAny;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.
RequireAll
Every proof in the set must verify. The set must be non-empty.
RequireAny
At least one proof must verify.
RequireThreshold(usize)
At least n proofs must verify. A threshold of zero is treated
as RequireAll (the degenerate case is a user error —
callers should pick a meaningful threshold).
Trait Implementations§
Source§impl Clone for VerifyPolicy
impl Clone for VerifyPolicy
Source§fn clone(&self) -> VerifyPolicy
fn clone(&self) -> VerifyPolicy
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 moreimpl Copy for VerifyPolicy
Source§impl Debug for VerifyPolicy
impl Debug for VerifyPolicy
impl Eq for VerifyPolicy
Source§impl PartialEq for VerifyPolicy
impl PartialEq for VerifyPolicy
Source§fn eq(&self, other: &VerifyPolicy) -> bool
fn eq(&self, other: &VerifyPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VerifyPolicy
Auto Trait Implementations§
impl Freeze for VerifyPolicy
impl RefUnwindSafe for VerifyPolicy
impl Send for VerifyPolicy
impl Sync for VerifyPolicy
impl Unpin for VerifyPolicy
impl UnsafeUnpin for VerifyPolicy
impl UnwindSafe for VerifyPolicy
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