[][src]Enum finality_grandpa::voter::Callback

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

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.

Methods

impl<O> Callback<O>[src]

pub fn run(&mut self, o: O)[src]

Do the work associated with the callback, if any.

Auto Trait Implementations

impl<O> Send for Callback<O>

impl<O> Unpin for Callback<O>

impl<O> !Sync for Callback<O>

impl<O> !UnwindSafe for Callback<O>

impl<O> !RefUnwindSafe for Callback<O>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T