#[non_exhaustive]pub struct VerifyOptions {
pub expected_context: Option<Vec<String>>,
pub allowed_suites: Vec<CryptoSuite>,
}Expand description
Options for verifying a Data Integrity proof.
Currently carries the document’s externally-supplied @context (for
comparison with the proof’s declared context) and an optional allowlist
of acceptable cryptosuites. More fields will be added as the library
grows — #[non_exhaustive] ensures future additions do not break
callers.
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.expected_context: Option<Vec<String>>Expected @context of the signed document. When Some, the
verifier enforces that the proof’s @context matches.
allowed_suites: Vec<CryptoSuite>If non-empty, the proof’s cryptosuite must appear in this list.
Use to reject proofs produced by suites your policy does not
accept (e.g. refuse bbs-2023 in a context that requires full
disclosure).
Implementations§
Source§impl VerifyOptions
impl VerifyOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs an empty VerifyOptions. Equivalent to
VerifyOptions::default.
Sourcepub fn with_expected_context(self, ctx: Vec<String>) -> Self
pub fn with_expected_context(self, ctx: Vec<String>) -> Self
Sets the expected document @context.
Sourcepub fn with_allowed_suites(self, suites: Vec<CryptoSuite>) -> Self
pub fn with_allowed_suites(self, suites: Vec<CryptoSuite>) -> Self
Restricts the set of cryptosuites the verifier will accept.
Trait Implementations§
Source§impl Clone for VerifyOptions
impl Clone for VerifyOptions
Source§fn clone(&self) -> VerifyOptions
fn clone(&self) -> VerifyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more