pub trait MessageVerificationExt {
// Required methods
fn verification_data(&self) -> Result<Vec<u8>>;
fn verification(&self) -> &MessageVerification;
// Provided methods
fn is_expired(&self) -> bool { ... }
fn verify(&self) -> bool { ... }
fn signer(&self) -> Did { ... }
}Expand description
This trait helps a struct with MessageVerification field to verify itself.
It also provides a signer method to let receiver know who sent the message.
Required Methods§
Sourcefn verification_data(&self) -> Result<Vec<u8>>
fn verification_data(&self) -> Result<Vec<u8>>
Give the data to be verified.
Sourcefn verification(&self) -> &MessageVerification
fn verification(&self) -> &MessageVerification
Give the verification field for verifying.
Provided Methods§
Sourcefn is_expired(&self) -> bool
fn is_expired(&self) -> bool
Checks whether the message is expired.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".