pub trait BlockBuilder<Block: BlockT>: Core<Block> {
// Provided methods
fn apply_extrinsic(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
extrinsic: <Block as BlockT>::Extrinsic,
) -> Result<ApplyExtrinsicResult, ApiError> { ... }
fn apply_extrinsic_before_version_6(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
extrinsic: <Block as BlockT>::Extrinsic,
) -> Result<ApplyExtrinsicResult, ApiError> { ... }
fn finalize_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<<Block as BlockT>::Header, ApiError> { ... }
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
inherent: InherentData,
) -> Result<Vec<<Block as BlockT>::Extrinsic>, ApiError> { ... }
fn check_inherents(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
block: <Block as BlockT>::LazyBlock,
data: InherentData,
) -> Result<CheckInherentsResult, ApiError> { ... }
}Expand description
The BlockBuilder api trait that provides the required functionality for building a block.
Provided Methods§
Sourcefn apply_extrinsic(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
extrinsic: <Block as BlockT>::Extrinsic,
) -> Result<ApplyExtrinsicResult, ApiError>
fn apply_extrinsic( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, extrinsic: <Block as BlockT>::Extrinsic, ) -> Result<ApplyExtrinsicResult, ApiError>
Apply the given extrinsic.
Returns an inclusion outcome which specifies if this extrinsic is included in this block or not.
fn apply_extrinsic_before_version_6( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, extrinsic: <Block as BlockT>::Extrinsic, ) -> Result<ApplyExtrinsicResult, ApiError>
👎Deprecated
Sourcefn finalize_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<<Block as BlockT>::Header, ApiError>
fn finalize_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<<Block as BlockT>::Header, ApiError>
Finish the current block.
Sourcefn inherent_extrinsics(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
inherent: InherentData,
) -> Result<Vec<<Block as BlockT>::Extrinsic>, ApiError>
fn inherent_extrinsics( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, inherent: InherentData, ) -> Result<Vec<<Block as BlockT>::Extrinsic>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
Sourcefn check_inherents(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
block: <Block as BlockT>::LazyBlock,
data: InherentData,
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, block: <Block as BlockT>::LazyBlock, data: InherentData, ) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".