pub struct VerificationOutcome {
pub valid: bool,
pub signer_id: String,
pub timestamp: String,
pub data: Value,
pub errors: Vec<String>,
}Expand description
Structured verification result returned by CoreAgent::verify and
CoreAgent::verify_with_key.
valid is true iff the cryptographic signature reconstructs and the
algorithm matches the expected algorithm. The other fields are
extracted from the signed document so callers do not have to re-parse
the JSON to find them.
errors is a list of human-readable error strings when valid is
false. It is always empty when valid is true.
Fields§
§valid: boolWhether the cryptographic signature verified.
signer_id: StringjacsSignature.agentID, empty if the field is absent.
timestamp: StringjacsSignature.date, empty if the field is absent.
data: ValueThe full signed document, returned as-is so callers do not have to re-parse the JSON.
errors: Vec<String>Human-readable error descriptions when valid is false.
Trait Implementations§
Source§impl Clone for VerificationOutcome
impl Clone for VerificationOutcome
Source§fn clone(&self) -> VerificationOutcome
fn clone(&self) -> VerificationOutcome
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 moreSource§impl Debug for VerificationOutcome
impl Debug for VerificationOutcome
Source§impl<'de> Deserialize<'de> for VerificationOutcome
impl<'de> Deserialize<'de> for VerificationOutcome
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VerificationOutcome
impl RefUnwindSafe for VerificationOutcome
impl Send for VerificationOutcome
impl Sync for VerificationOutcome
impl Unpin for VerificationOutcome
impl UnsafeUnpin for VerificationOutcome
impl UnwindSafe for VerificationOutcome
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