[−]Trait polymesh::service::CoreApi
The Core
runtime api that every Substrate runtime needs to implement.
Provided methods
pub fn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, Self::Error>
Returns the version of the runtime.
pub fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, Self::Error>
Returns the version of the runtime.
pub fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, Self::Error>
👎 Deprecated
Returns the version of the runtime.
pub fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, Self::Error>
👎 Deprecated
Returns the version of the runtime.
pub fn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), Self::Error>
Execute the given block.
pub fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), Self::Error>
Execute the given block.
pub fn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Initialize a block with the given header.
pub fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Initialize a block with the given header.
Trait Implementations
impl<Block, __Sr_Api_Error__> RuntimeApiInfo for dyn Core<Block, Error = __Sr_Api_Error__> + 'static where
Block: Block,
Block: Block,
Implementations on Foreign Types
impl<__SR_API_BLOCK__, RuntimeApiImplCall> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
[src]
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
pub fn Core_version_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_execute_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_initialize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
impl<__SR_API_BLOCK__, RuntimeApiImplCall> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
[src]
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
pub fn Core_version_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_execute_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_initialize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
impl<__SR_API_BLOCK__, RuntimeApiImplCall> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
[src]
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe + Block,
RuntimeApiImplCall: 'static + CallApiAt<__SR_API_BLOCK__>,
<RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::StateBackend: Backend<<<__SR_API_BLOCK__ as Block>::Header as Header>::Hashing>,
RuntimeVersion: UnwindSafe,
RuntimeVersion: RefUnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: UnwindSafe,
<__SR_API_BLOCK__ as Block>::Header: RefUnwindSafe,
pub fn Core_version_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<RuntimeVersion>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_execute_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
pub fn Core_initialize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>
[src]
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as Block>::Header>,
params_encoded: Vec<u8, Global>
) -> Result<NativeOrEncoded<()>, <RuntimeApiImplCall as CallApiAt<__SR_API_BLOCK__>>::Error>