pub trait SignedPayload<T: SigningTypes>: Encode {
// Required method
fn public(&self) -> T::Public;
// Provided methods
fn sign<C: AppCrypto<T::Public, T::Signature>>(
&self,
) -> Option<T::Signature> { ... }
fn verify<C: AppCrypto<T::Public, T::Signature>>(
&self,
signature: T::Signature,
) -> bool { ... }
}
Expand description
Utility trait to be implemented on payloads that can be signed.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.