referrerpolicy=no-referrer-when-downgrade
polkadot_sdk_frame::traits

Trait EnsureInherentsAreFirst

pub trait EnsureInherentsAreFirst<Block>: IsInherent<<Block as Block>::Extrinsic>
where Block: Block,
{ // Required method fn ensure_inherents_are_first(block: &Block) -> Result<u32, u32>; }
Expand description

A trait to ensure the inherent are before non-inherent in a block.

This is typically implemented on runtime, through construct_runtime!.

Required Methods§

fn ensure_inherents_are_first(block: &Block) -> Result<u32, u32>

Ensure the position of inherent is correct, i.e. they are before non-inherents.

On error return the index of the inherent with invalid position (counting from 0). On success it returns the index of the last inherent. 0 therefore means that there are no inherents.

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§

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Test as Config>::Block> for Test

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Test as Config>::Block> for Test

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime