pub trait MessageVerificationExt {
const DOMAIN_TAG: DomainTag;
// Required methods
fn verification_data(&self) -> Result<Vec<u8>, Error>;
fn verification(&self) -> &MessageVerification;
// Provided methods
fn is_expired(&self) -> bool { ... }
fn verify_at(&self, network_id: u32, at_ms: u128) -> bool { ... }
fn verify(&self, network_id: u32) -> 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 Associated Constants§
Sourceconst DOMAIN_TAG: DomainTag
const DOMAIN_TAG: DomainTag
The message family this type is signed under. Paired with the receiver’s overlay it
fixes the SigningDomain of Self::verification.
Required Methods§
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.
Sourcefn verify_at(&self, network_id: u32, at_ms: u128) -> bool
fn verify_at(&self, network_id: u32, at_ms: u128) -> bool
Verifies the message as of the instant at_ms: its proof was live then, its session was
authorized and live then, and the signature was issued for this message family inside
the overlay network_id.
Every transport path judges as of now through Self::verify; a relay inbox judges a
held message as of the instant its holder received it, so a sender’s session expiring
afterwards does not retroactively unverify a message that was valid when held.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".