#[non_exhaustive]pub struct VerificationResult {
pub signers: Vec<SignerResult>,
}Expand description
Overall result from verifying a multipart/signed S/MIME message.
Ok(VerificationResult) is returned only when at least one signer
verified successfully. Per-signer detail (including failures for other
signers) is available in the signers vec.
§Security
is_verified returns true if any one signer passed
verification. For messages with multiple signers, inspect signers
individually to confirm all expected signers are present and valid.
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.signers: Vec<SignerResult>One entry per SignerInfo found in the SignedData.
Implementations§
Source§impl VerificationResult
impl VerificationResult
Sourcepub fn is_verified(&self) -> bool
pub fn is_verified(&self) -> bool
Returns true if at least one signer verified successfully.
§Security
This method returns true if any one signer’s certificate and signature verified
successfully. In a message with multiple signers, some may have failed verification
while this method still returns true. For security-critical decisions — especially
when a policy requires all signers to be valid — use all_verified
instead, or iterate signers directly.
Sourcepub fn all_verified(&self) -> bool
pub fn all_verified(&self) -> bool
Returns true only if every signer verified successfully.
Prefer this over is_verified whenever your policy requires
that all signers on a message are valid — for example, dual-control workflows or
messages that must carry a specific set of signers.
Returns false if signers is empty (no signers at all is not a success).
Sourcepub fn verified_signers(&self) -> impl Iterator<Item = &SignerResult>
pub fn verified_signers(&self) -> impl Iterator<Item = &SignerResult>
Returns an iterator over only the SignerResult entries that verified successfully.
Useful when you need to inspect or count the verified signers without examining
failed ones. Combine with all_verified to enforce a
minimum verified-signer count.
Trait Implementations§
Source§impl Clone for VerificationResult
impl Clone for VerificationResult
Source§fn clone(&self) -> VerificationResult
fn clone(&self) -> VerificationResult
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 VerificationResult
impl Debug for VerificationResult
Source§impl<'de> Deserialize<'de> for VerificationResult
impl<'de> Deserialize<'de> for VerificationResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for VerificationResult
Source§impl PartialEq for VerificationResult
impl PartialEq for VerificationResult
Source§fn eq(&self, other: &VerificationResult) -> bool
fn eq(&self, other: &VerificationResult) -> bool
self and other values to be equal, and is used by ==.