pub trait Application:
Clone
+ Send
+ 'static {
type Context;
type Digest: Array;
// Required method
fn verify(
&mut self,
context: Self::Context,
payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send;
}Expand description
Application is the interface responsible for processing messages received from the network.
Required Associated Types§
Required Methods§
Sourcefn verify(
&mut self,
context: Self::Context,
payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send
fn verify( &mut self, context: Self::Context, payload: Self::Digest, ) -> impl Future<Output = Receiver<bool>> + Send
Verify a proposed payload received from the network.
Returns a future that resolves to a boolean indicating success. Part of verification requires ensuring that the data is made available. For example, by storing it in a database.
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.