Trait Committer

Source
pub trait Committer:
    Clone
    + Send
    + 'static {
    type Digest: Array;

    // Required methods
    fn prepared(
        &mut self,
        proof: Proof,
        payload: Self::Digest,
    ) -> impl Future<Output = ()> + Send;
    fn finalized(
        &mut self,
        proof: Proof,
        payload: Self::Digest,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

Committer is the interface responsible for handling notifications of payload status.

Required Associated Types§

Source

type Digest: Array

Hash of an arbitrary payload.

Required Methods§

Source

fn prepared( &mut self, proof: Proof, payload: Self::Digest, ) -> impl Future<Output = ()> + Send

Event that a payload has made some progress towards finalization but is not yet finalized.

This is often used to provide an early (“best guess”) confirmation to users.

Source

fn finalized( &mut self, proof: Proof, payload: Self::Digest, ) -> impl Future<Output = ()> + Send

Event indicating the container has been finalized.

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§