Trait sp_offchain::OffchainWorkerApi [−][src]
pub trait OffchainWorkerApi<Block: BlockT>: Core<Block> { fn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
number: NumberFor<Block>
) -> Result<(), ApiError> { ... } fn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: NumberFor<Block>
) -> Result<(), ApiError> { ... } fn offchain_worker(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &Block::Header
) -> Result<(), ApiError> { ... } fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &Block::Header
) -> Result<(), ApiError> { ... } }
Expand description
The offchain worker api.
Provided methods
👎 Deprecated
Starts the off-chain task for given block number.
fn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: NumberFor<Block>
) -> Result<(), ApiError>
fn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: NumberFor<Block>
) -> Result<(), ApiError>
👎 Deprecated
Starts the off-chain task for given block number.
Starts the off-chain task for given block header.
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &Block::Header
) -> Result<(), ApiError>
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &Block::Header
) -> Result<(), ApiError>
Starts the off-chain task for given block header.
Trait Implementations
Implementors
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,