Trait BlockRule

Source
pub trait BlockRule: 'static {
    // Required method
    fn run(state: &mut BlockState<'_, '_>) -> Option<(Node, usize)>;

    // Provided method
    fn check(state: &mut BlockState<'_, '_>) -> Option<()> { ... }
}
Expand description

Each member of a block rule chain must implement this trait

Required Methods§

Source

fn run(state: &mut BlockState<'_, '_>) -> Option<(Node, usize)>

Provided Methods§

Source

fn check(state: &mut BlockState<'_, '_>) -> Option<()>

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§