Skip to main content

BlockRule

Trait BlockRule 

Source
pub trait BlockRule<F: HeaderFamily>: Debug {
    // Required methods
    fn id(&self) -> &str;
    fn check(&self, ctx: &BlockContext<'_, F>) -> Option<bool>;
}
Expand description

An additional block-context rule: the extension point for rules a chain document may name beyond the core (SPEC 12). It sees the same context the built-in rules see and answers the same three ways.

Required Methods§

Source

fn id(&self) -> &str

The rule id reported in the verdict.

Source

fn check(&self, ctx: &BlockContext<'_, F>) -> Option<bool>

The check.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§