Skip to main content

ReceiptDispatchHook

Trait ReceiptDispatchHook 

Source
pub trait ReceiptDispatchHook: Send + Sync {
    // Required method
    fn on_authority_dispatch(&self, dispatch: AuthorityDispatch<'_>);
}
Expand description

Optional post-dispatch receipt hook (S1 receipts core).

Called after a destructive dispatch — the authority seam — on success, and on failure when a pass was presented (the receipt then records an error termination). Implementations must be non-failing (log their own errors) and must never alter the dispatch result. The disabled default (None) costs one Option::is_some check on the success path.

Required Methods§

Source

fn on_authority_dispatch(&self, dispatch: AuthorityDispatch<'_>)

Called after a destructive dispatch at the authority seam.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§