pub trait InvalidBlockHookExt {
type Primitives: NodePrimitives;
// Required method
fn create_invalid_block_hook(
&self,
data_dir: &ChainPath<DataDirPath>,
) -> impl Future<Output = Result<Box<dyn InvalidBlockHook<Self::Primitives>>>> + Send;
}
Expand description
Extension trait for AddOnsContext
to create invalid block hooks.
Required Associated Types§
Sourcetype Primitives: NodePrimitives
type Primitives: NodePrimitives
Node primitives type.
Required Methods§
Sourcefn create_invalid_block_hook(
&self,
data_dir: &ChainPath<DataDirPath>,
) -> impl Future<Output = Result<Box<dyn InvalidBlockHook<Self::Primitives>>>> + Send
fn create_invalid_block_hook( &self, data_dir: &ChainPath<DataDirPath>, ) -> impl Future<Output = Result<Box<dyn InvalidBlockHook<Self::Primitives>>>> + Send
Creates an invalid block hook based on the node configuration.
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.