Trait Monitor

Source
pub trait Monitor:
    Clone
    + Send
    + 'static {
    type PublicKey: PublicKey;
    type Response: Committable + Digestible + Codec;

    // Required method
    fn collected(
        &mut self,
        handler: Self::PublicKey,
        response: Self::Response,
        count: usize,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

A Monitor collects responses from Handlers.

Required Associated Types§

Source

type PublicKey: PublicKey

The PublicKey of the Handler.

Source

type Response: Committable + Digestible + Codec

The type of response collected.

Required Methods§

Source

fn collected( &mut self, handler: Self::PublicKey, response: Self::Response, count: usize, ) -> impl Future<Output = ()> + Send

Called for each response collected with the number of responses collected so far for the same commitment.

Monitor::collected is only called once per handler.

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.

Implementors§