pub enum Callback<O> {
    Blank,
    Work(Box<dyn FnMut(O) + Send>),
}
Expand description

Callback used to pass information about the outcome of importing a given message (e.g. vote, commit, catch up). Useful to propagate data to the network after making sure the import is successful.

Variants§

§

Blank

Default value.

§

Work(Box<dyn FnMut(O) + Send>)

Callback to execute given a processing outcome.

Implementations§

Do the work associated with the callback, if any.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.