pub struct RuntimeApiImpl<Block: BlockT, C: CallApiAt<Block> + 'static> { /* private fields */ }
Expand description
Implements all runtime apis for the client side.
Trait Implementations§
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> AccountNonceApi<__SrApiBlock__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
AccountId: UnwindSafe + RefUnwindSafe,
Nonce: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> AccountNonceApi<__SrApiBlock__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
AccountId: UnwindSafe + RefUnwindSafe,
Nonce: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn account_nonce(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
account: AccountId,
) -> Result<Nonce, ApiError>
fn account_nonce( &self, __runtime_api_at_param__: <Block as Block>::Hash, account: AccountId, ) -> Result<Nonce, ApiError>
Get current account nonce of given
AccountId
.source§impl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C>
impl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C>
source§fn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F,
) -> Rwhere
Self: Sized,
fn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F,
) -> Rwhere
Self: Sized,
Execute the given closure inside a new transaction. Read more
source§fn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: <Block as BlockT>::Hash,
) -> Result<bool, ApiError>where
Self: Sized,
fn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: <Block as BlockT>::Hash,
) -> Result<bool, ApiError>where
Self: Sized,
Checks if the given api is implemented and versions match.
source§fn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: <Block as BlockT>::Hash,
pred: P,
) -> Result<bool, ApiError>where
Self: Sized,
fn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: <Block as BlockT>::Hash,
pred: P,
) -> Result<bool, ApiError>where
Self: Sized,
Check if the given api is implemented and the version passes a predicate.
source§fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: <Block as BlockT>::Hash,
) -> Result<Option<u32>, ApiError>where
Self: Sized,
fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: <Block as BlockT>::Hash,
) -> Result<Option<u32>, ApiError>where
Self: Sized,
Returns the version of the given api.
source§fn record_proof(&mut self)
fn record_proof(&mut self)
Start recording all accessed trie nodes for generating proofs.
source§fn proof_recorder(&self) -> Option<ProofRecorder<Block>>
fn proof_recorder(&self) -> Option<ProofRecorder<Block>>
Returns the current active proof recorder.
source§fn extract_proof(&mut self) -> Option<StorageProof>
fn extract_proof(&mut self) -> Option<StorageProof>
Extract the recorded proof. Read more
source§fn into_storage_changes<B: StateBackend<HashingFor<Block>>>(
&self,
backend: &B,
parent_hash: Block::Hash,
) -> Result<StorageChanges<Block>, String>where
Self: Sized,
fn into_storage_changes<B: StateBackend<HashingFor<Block>>>(
&self,
backend: &B,
parent_hash: Block::Hash,
) -> Result<StorageChanges<Block>, String>where
Self: Sized,
Convert the api object into the storage changes that were done while executing runtime
api functions. Read more
source§fn set_call_context(&mut self, call_context: CallContext)
fn set_call_context(&mut self, call_context: CallContext)
Set the [
CallContext
] to be used by the runtime api calls done by this instance.source§fn register_extension<E: Extension>(&mut self, extension: E)
fn register_extension<E: Extension>(&mut self, extension: E)
Register an [
Extension
] that will be accessible while executing a runtime api call.source§impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BlockBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BlockBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn apply_extrinsic(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
extrinsic: <Block as Block>::Extrinsic,
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic( &self, __runtime_api_at_param__: <Block as Block>::Hash, extrinsic: <Block as Block>::Extrinsic, ) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
Apply the given extrinsic. Read more
§fn apply_extrinsic_before_version_6(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
extrinsic: <Block as Block>::Extrinsic,
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic_before_version_6( &self, __runtime_api_at_param__: <Block as Block>::Hash, extrinsic: <Block as Block>::Extrinsic, ) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
👎Deprecated
§fn finalize_block(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<<Block as Block>::Header, ApiError>
fn finalize_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<<Block as Block>::Header, ApiError>
Finish the current block.
§fn inherent_extrinsics(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
inherent: InherentData,
) -> Result<Vec<<Block as Block>::Extrinsic>, ApiError>
fn inherent_extrinsics( &self, __runtime_api_at_param__: <Block as Block>::Hash, inherent: InherentData, ) -> Result<Vec<<Block as Block>::Extrinsic>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
§fn check_inherents(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block: Block,
data: InherentData,
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, data: InherentData, ) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BundleProducerElectionApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
DomainId: UnwindSafe + RefUnwindSafe,
Option<BundleProducerElectionParams<Balance>>: UnwindSafe + RefUnwindSafe,
OperatorId: UnwindSafe + RefUnwindSafe,
Option<(OperatorPublicKey, Balance)>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BundleProducerElectionApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
DomainId: UnwindSafe + RefUnwindSafe,
Option<BundleProducerElectionParams<Balance>>: UnwindSafe + RefUnwindSafe,
OperatorId: UnwindSafe + RefUnwindSafe,
Option<(OperatorPublicKey, Balance)>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
fn bundle_producer_election_params( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<BundleProducerElectionParams<Balance>>, ApiError>
fn operator( &self, __runtime_api_at_param__: <Block as Block>::Hash, operator_id: u64, ) -> Result<Option<(Public, Balance)>, ApiError>
source§impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Core<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
ExtrinsicInclusionMode: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Core<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
ExtrinsicInclusionMode: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn version(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<RuntimeVersion, ApiError>
fn version( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
§fn execute_block(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block: Block,
) -> Result<(), ApiError>
fn execute_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, ) -> Result<(), ApiError>
Execute the given block.
§fn initialize_block_before_version_5(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
header: &<Block as Block>::Header,
) -> Result<(), ApiError>
fn initialize_block_before_version_5( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<(), ApiError>
👎Deprecated
Initialize a block with the given header.
§fn initialize_block(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
header: &<Block as Block>::Header,
) -> Result<ExtrinsicInclusionMode, ApiError>
fn initialize_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<ExtrinsicInclusionMode, ApiError>
Initialize a block with the given header and return the runtime executive mode.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> DomainsApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
OpaqueBundle<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe,
SealedSingletonReceipt<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe,
DomainId: UnwindSafe + RefUnwindSafe,
Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
OpaqueBundles<__SrApiBlock__, Header, Balance>: UnwindSafe + RefUnwindSafe,
Randomness: UnwindSafe + RefUnwindSafe,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Option<RuntimeId>: UnwindSafe + RefUnwindSafe,
Option<(DomainInstanceData, NumberFor<__SrApiBlock__>)>: UnwindSafe + RefUnwindSafe,
Moment: UnwindSafe + RefUnwindSafe,
U256: UnwindSafe + RefUnwindSafe,
Option<H256>: UnwindSafe + RefUnwindSafe,
BlockNumber: UnwindSafe + RefUnwindSafe,
Option<BlockNumber>: UnwindSafe + RefUnwindSafe,
Option<DomainBundleLimit>: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
Hash: UnwindSafe + RefUnwindSafe,
Option<ExecutionReceiptFor<Header, __SrApiBlock__, Balance>>: UnwindSafe + RefUnwindSafe,
Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>: UnwindSafe + RefUnwindSafe,
OperatorPublicKey: UnwindSafe + RefUnwindSafe,
Option<OperatorId>: UnwindSafe + RefUnwindSafe,
Option<Hash>: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
Option<(BlockNumber, Hash)>: UnwindSafe + RefUnwindSafe,
OperatorId: UnwindSafe + RefUnwindSafe,
NumberFor<__SrApiBlock__>: UnwindSafe + RefUnwindSafe,
Option<bool>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> DomainsApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
OpaqueBundle<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe,
SealedSingletonReceipt<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe,
DomainId: UnwindSafe + RefUnwindSafe,
Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
OpaqueBundles<__SrApiBlock__, Header, Balance>: UnwindSafe + RefUnwindSafe,
Randomness: UnwindSafe + RefUnwindSafe,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Option<RuntimeId>: UnwindSafe + RefUnwindSafe,
Option<(DomainInstanceData, NumberFor<__SrApiBlock__>)>: UnwindSafe + RefUnwindSafe,
Moment: UnwindSafe + RefUnwindSafe,
U256: UnwindSafe + RefUnwindSafe,
Option<H256>: UnwindSafe + RefUnwindSafe,
BlockNumber: UnwindSafe + RefUnwindSafe,
Option<BlockNumber>: UnwindSafe + RefUnwindSafe,
Option<DomainBundleLimit>: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
Hash: UnwindSafe + RefUnwindSafe,
Option<ExecutionReceiptFor<Header, __SrApiBlock__, Balance>>: UnwindSafe + RefUnwindSafe,
Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>: UnwindSafe + RefUnwindSafe,
OperatorPublicKey: UnwindSafe + RefUnwindSafe,
Option<OperatorId>: UnwindSafe + RefUnwindSafe,
Option<Hash>: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
Option<(BlockNumber, Hash)>: UnwindSafe + RefUnwindSafe,
OperatorId: UnwindSafe + RefUnwindSafe,
NumberFor<__SrApiBlock__>: UnwindSafe + RefUnwindSafe,
Option<bool>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn submit_bundle_unsigned(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
opaque_bundle: Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>,
) -> Result<(), ApiError>
fn submit_bundle_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, opaque_bundle: Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>, ) -> Result<(), ApiError>
Submits the transaction bundle via an unsigned extrinsic.
fn submit_receipt_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, singleton_receipt: SealedSingletonReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>, ) -> Result<(), ApiError>
source§fn extract_successful_bundles(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
extrinsics: Vec<<Block as Block>::Extrinsic>,
) -> Result<Vec<Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>>, ApiError>
fn extract_successful_bundles( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, extrinsics: Vec<<Block as Block>::Extrinsic>, ) -> Result<Vec<Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>>, ApiError>
Extract the bundles stored successfully from the given extrinsics.
source§fn extrinsics_shuffling_seed(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<Randomness, ApiError>
fn extrinsics_shuffling_seed( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Randomness, ApiError>
Generates a randomness seed for extrinsics shuffling.
source§fn domain_runtime_code(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError>
fn domain_runtime_code( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>
Returns the WASM bundle for given
domain_id
.source§fn runtime_id(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<u32>, ApiError>
fn runtime_id( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<u32>, ApiError>
Returns the runtime id for given
domain_id
.source§fn domain_instance_data(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<(DomainInstanceData, <<Block as Block>::Header as Header>::Number)>, ApiError>
fn domain_instance_data( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(DomainInstanceData, <<Block as Block>::Header as Header>::Number)>, ApiError>
Returns the domain instance data for given
domain_id
.source§fn timestamp(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<u64, ApiError>
fn timestamp( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u64, ApiError>
Returns the current timestamp at given height.
source§fn domain_tx_range(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<U256, ApiError>
fn domain_tx_range( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<U256, ApiError>
Returns the current Tx range for the given domain Id.
source§fn genesis_state_root(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<H256>, ApiError>
fn genesis_state_root( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<H256>, ApiError>
Return the genesis state root if not pruned
source§fn head_receipt_number(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<<DomainHeader as Header>::Number, ApiError>
fn head_receipt_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<<DomainHeader as Header>::Number, ApiError>
Returns the best execution chain number.
source§fn oldest_unconfirmed_receipt_number(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>
fn oldest_unconfirmed_receipt_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>
Returns the block number of oldest unconfirmed execution receipt.
source§fn domain_bundle_limit(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainBundleLimit>, ApiError>
fn domain_bundle_limit( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainBundleLimit>, ApiError>
Returns the domain bundle limit of the given domain.
source§fn non_empty_er_exists(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<bool, ApiError>
fn non_empty_er_exists( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<bool, ApiError>
Returns true if there are any ERs in the challenge period with non empty extrinsics.
source§fn domain_best_number(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>
fn domain_best_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>
Returns the current best number of the domain.
source§fn execution_receipt(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
receipt_hash: <DomainHeader as Header>::Hash,
) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>
fn execution_receipt( &self, __runtime_api_at_param__: <Block as Block>::Hash, receipt_hash: <DomainHeader as Header>::Hash, ) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>
Returns the execution receipt
source§fn domain_operators(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<(BTreeMap<u64, u128>, Vec<u64>)>, ApiError>
fn domain_operators( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(BTreeMap<u64, u128>, Vec<u64>)>, ApiError>
Returns the current epoch and the next epoch operators of the given domain
source§fn operator_id_by_signing_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
signing_key: Public,
) -> Result<Option<u64>, ApiError>
fn operator_id_by_signing_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, signing_key: Public, ) -> Result<Option<u64>, ApiError>
Get operator id by signing key
source§fn receipt_hash(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
domain_number: <DomainHeader as Header>::Number,
) -> Result<Option<<DomainHeader as Header>::Hash>, ApiError>
fn receipt_hash( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, domain_number: <DomainHeader as Header>::Number, ) -> Result<Option<<DomainHeader as Header>::Hash>, ApiError>
Returns the execution receipt hash of the given domain and domain block number
source§fn consensus_chain_byte_fee(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<u128, ApiError>
fn consensus_chain_byte_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u128, ApiError>
Return the consensus chain byte fee that will used to charge the domain transaction for consensus
chain storage fee
source§fn latest_confirmed_domain_block(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<(<DomainHeader as Header>::Number, <DomainHeader as Header>::Hash)>, ApiError>
fn latest_confirmed_domain_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(<DomainHeader as Header>::Number, <DomainHeader as Header>::Hash)>, ApiError>
Returns the latest confirmed domain block number and hash
source§fn is_bad_er_pending_to_prune(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
receipt_hash: <DomainHeader as Header>::Hash,
) -> Result<bool, ApiError>
fn is_bad_er_pending_to_prune( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, receipt_hash: <DomainHeader as Header>::Hash, ) -> Result<bool, ApiError>
Return if the receipt is exist and pending to prune
source§fn storage_fund_account_balance(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
operator_id: u64,
) -> Result<u128, ApiError>
fn storage_fund_account_balance( &self, __runtime_api_at_param__: <Block as Block>::Hash, operator_id: u64, ) -> Result<u128, ApiError>
Return the balance of the storage fund account
source§fn is_domain_runtime_upgraded_since(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
at: <<Block as Block>::Header as Header>::Number,
) -> Result<Option<bool>, ApiError>
fn is_domain_runtime_upgraded_since( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, at: <<Block as Block>::Header as Header>::Number, ) -> Result<Option<bool>, ApiError>
Return if the domain runtime code is upgraded since
at
source§fn domain_sudo_call(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError>
fn domain_sudo_call( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>
Return domain sudo call.
source§fn last_confirmed_domain_block_receipt(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>
fn last_confirmed_domain_block_receipt( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>
Return last confirmed domain block execution receipt.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> FraudProofApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
FraudProof<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, H256>: UnwindSafe + RefUnwindSafe,
FraudProofStorageKeyRequest<NumberFor<__SrApiBlock__>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> FraudProofApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
FraudProof<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, H256>: UnwindSafe + RefUnwindSafe,
FraudProofStorageKeyRequest<NumberFor<__SrApiBlock__>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn submit_fraud_proof_unsigned(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
fraud_proof: FraudProof<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, H256>,
) -> Result<(), ApiError>
fn submit_fraud_proof_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, fraud_proof: FraudProof<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, H256>, ) -> Result<(), ApiError>
Submit the fraud proof via an unsigned extrinsic.
source§fn fraud_proof_storage_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
req: FraudProofStorageKeyRequest<<<Block as Block>::Header as Header>::Number>,
) -> Result<Vec<u8>, ApiError>
fn fraud_proof_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, req: FraudProofStorageKeyRequest<<<Block as Block>::Header as Header>::Number>, ) -> Result<Vec<u8>, ApiError>
Reture the storage key used in fraud proof
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> GenesisBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Result: UnwindSafe + RefUnwindSafe,
Option<PresetId>: UnwindSafe + RefUnwindSafe,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<PresetId>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> GenesisBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Result: UnwindSafe + RefUnwindSafe,
Option<PresetId>: UnwindSafe + RefUnwindSafe,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<PresetId>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn build_state(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
json: Vec<u8>,
) -> Result<Result<(), String>, ApiError>
fn build_state( &self, __runtime_api_at_param__: <Block as Block>::Hash, json: Vec<u8>, ) -> Result<Result<(), String>, ApiError>
Build
RuntimeGenesisConfig
from a JSON blob not using any defaults and store it in the
storage. Read moresource§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MessengerApi<__SrApiBlock__, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
Option<bool>: UnwindSafe + RefUnwindSafe,
Option<ConsensusChainMmrLeafProof<BlockNumber, <__SrApiBlock__ as BlockT>::Hash, H256>>: UnwindSafe + RefUnwindSafe,
DomainId: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
MessageKey: UnwindSafe + RefUnwindSafe,
Option<DomainAllowlistUpdates>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MessengerApi<__SrApiBlock__, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
Option<bool>: UnwindSafe + RefUnwindSafe,
Option<ConsensusChainMmrLeafProof<BlockNumber, <__SrApiBlock__ as BlockT>::Hash, H256>>: UnwindSafe + RefUnwindSafe,
DomainId: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
MessageKey: UnwindSafe + RefUnwindSafe,
Option<DomainAllowlistUpdates>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn is_xdm_mmr_proof_valid(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
ext: &<Block as Block>::Extrinsic,
) -> Result<Option<bool>, ApiError>
fn is_xdm_mmr_proof_valid( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<bool>, ApiError>
Returns
Some(true)
if valid XDM or Some(false)
if not
Returns None if this is not an XDMfn extract_xdm_mmr_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError>
source§fn confirmed_domain_block_storage_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Vec<u8>, ApiError>
fn confirmed_domain_block_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Vec<u8>, ApiError>
Returns the confirmed domain block storage for given domain.
source§fn outbox_storage_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
message_key: (ChainId, U256, U256),
) -> Result<Vec<u8>, ApiError>
fn outbox_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>
Returns storage key for outbox for a given message_id.
source§fn inbox_response_storage_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
message_key: (ChainId, U256, U256),
) -> Result<Vec<u8>, ApiError>
fn inbox_response_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>
Returns storage key for inbox response for a given message_id.
source§fn domain_chains_allowlist_update(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainAllowlistUpdates>, ApiError>
fn domain_chains_allowlist_update( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainAllowlistUpdates>, ApiError>
Returns any domain’s chains allowlist updates on consensus chain.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Metadata<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
Option<OpaqueMetadata>: UnwindSafe + RefUnwindSafe,
Vec<u32>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Metadata<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
Option<OpaqueMetadata>: UnwindSafe + RefUnwindSafe,
Vec<u32>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn metadata(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<OpaqueMetadata, ApiError>
fn metadata( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MmrApi<__SrApiBlock__, <<Runtime as Config>::Hashing as Hash>::Output, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Result<<<Runtime as Config>::Hashing as Hash>::Output, Error>: UnwindSafe + RefUnwindSafe,
Result<LeafIndex, Error>: UnwindSafe + RefUnwindSafe,
Vec<BlockNumber>: UnwindSafe + RefUnwindSafe,
Option<BlockNumber>: UnwindSafe + RefUnwindSafe,
Result<(Vec<EncodableOpaqueLeaf>, LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>), Error>: UnwindSafe + RefUnwindSafe,
Vec<EncodableOpaqueLeaf>: UnwindSafe + RefUnwindSafe,
LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
<<Runtime as Config>::Hashing as Hash>::Output: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MmrApi<__SrApiBlock__, <<Runtime as Config>::Hashing as Hash>::Output, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Result<<<Runtime as Config>::Hashing as Hash>::Output, Error>: UnwindSafe + RefUnwindSafe,
Result<LeafIndex, Error>: UnwindSafe + RefUnwindSafe,
Vec<BlockNumber>: UnwindSafe + RefUnwindSafe,
Option<BlockNumber>: UnwindSafe + RefUnwindSafe,
Result<(Vec<EncodableOpaqueLeaf>, LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>), Error>: UnwindSafe + RefUnwindSafe,
Vec<EncodableOpaqueLeaf>: UnwindSafe + RefUnwindSafe,
LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
<<Runtime as Config>::Hashing as Hash>::Output: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn mmr_root(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<Result<Hash, Error>, ApiError>
fn mmr_root( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Result<Hash, Error>, ApiError>
Return the on-chain MMR root hash.
§fn mmr_leaf_count(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<Result<u64, Error>, ApiError>
fn mmr_leaf_count( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Result<u64, Error>, ApiError>
Return the number of MMR blocks in the chain.
§fn generate_proof(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block_numbers: Vec<BlockNumber>,
best_known_block_number: Option<BlockNumber>,
) -> Result<Result<(Vec<EncodableOpaqueLeaf>, LeafProof<Hash>), Error>, ApiError>
fn generate_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, block_numbers: Vec<BlockNumber>, best_known_block_number: Option<BlockNumber>, ) -> Result<Result<(Vec<EncodableOpaqueLeaf>, LeafProof<Hash>), Error>, ApiError>
Generate MMR proof for a series of block numbers. If
best_known_block_number = Some(n)
,
use historical MMR state at given block height n
. Else, use current MMR state.source§impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> ObjectsApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
BlockObjectMapping: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> ObjectsApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
__SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT,
BlockObjectMapping: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn extract_block_object_mapping(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block: Block,
) -> Result<BlockObjectMapping, ApiError>
fn extract_block_object_mapping( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, ) -> Result<BlockObjectMapping, ApiError>
Extract block object mapping for a given block
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> OffchainWorkerApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> OffchainWorkerApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
number: <<Block as Block>::Header as Header>::Number,
) -> Result<(), ApiError>
fn offchain_worker_before_version_2( &self, __runtime_api_at_param__: <Block as Block>::Hash, number: <<Block as Block>::Header as Header>::Number, ) -> Result<(), ApiError>
👎Deprecated
Starts the off-chain task for given block number.
§fn offchain_worker(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
header: &<Block as Block>::Header,
) -> Result<(), ApiError>
fn offchain_worker( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<(), ApiError>
Starts the off-chain task for given block header.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> RelayerApi<__SrApiBlock__, u32, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
BlockMessagesWithStorageKey: UnwindSafe + RefUnwindSafe,
CrossDomainMessage<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, <__SrApiBlock__ as BlockT>::Hash>: UnwindSafe + RefUnwindSafe,
Option<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
ChainId: UnwindSafe + RefUnwindSafe,
MessageId: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
BTreeSet<(ChainId, ChannelId)>: UnwindSafe + RefUnwindSafe,
ChannelId: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> RelayerApi<__SrApiBlock__, u32, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
BlockMessagesWithStorageKey: UnwindSafe + RefUnwindSafe,
CrossDomainMessage<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, <__SrApiBlock__ as BlockT>::Hash>: UnwindSafe + RefUnwindSafe,
Option<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
ChainId: UnwindSafe + RefUnwindSafe,
MessageId: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
BTreeSet<(ChainId, ChannelId)>: UnwindSafe + RefUnwindSafe,
ChannelId: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn block_messages(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<BlockMessagesWithStorageKey, ApiError>
fn block_messages( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<BlockMessagesWithStorageKey, ApiError>
Returns all the outbox and inbox responses to deliver.
Storage key is used to generate the storage proof for the message.
source§fn outbox_message_unsigned(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
msg: CrossDomainMessage<CNumber, CHash, H256>,
) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>
fn outbox_message_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, msg: CrossDomainMessage<CNumber, CHash, H256>, ) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>
Constructs an outbox message to the dst_chain as an unsigned extrinsic.
source§fn inbox_response_message_unsigned(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
msg: CrossDomainMessage<CNumber, CHash, H256>,
) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>
fn inbox_response_message_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, msg: CrossDomainMessage<CNumber, CHash, H256>, ) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>
Constructs an inbox response message to the dst_chain as an unsigned extrinsic.
source§fn should_relay_outbox_message(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
dst_chain_id: ChainId,
msg_id: (U256, U256),
) -> Result<bool, ApiError>
fn should_relay_outbox_message( &self, __runtime_api_at_param__: <Block as Block>::Hash, dst_chain_id: ChainId, msg_id: (U256, U256), ) -> Result<bool, ApiError>
Returns true if the outbox message is ready to be relayed to dst_chain.
source§fn should_relay_inbox_message_response(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
dst_chain_id: ChainId,
msg_id: (U256, U256),
) -> Result<bool, ApiError>
fn should_relay_inbox_message_response( &self, __runtime_api_at_param__: <Block as Block>::Hash, dst_chain_id: ChainId, msg_id: (U256, U256), ) -> Result<bool, ApiError>
Returns true if the inbox message response is ready to be relayed to dst_chain.
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SessionKeys<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SessionKeys<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SubspaceApi<__SrApiBlock__, PublicKey> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
PotParameters: UnwindSafe + RefUnwindSafe,
SolutionRanges: UnwindSafe + RefUnwindSafe,
SignedVote<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, PublicKey>: UnwindSafe + RefUnwindSafe,
HistorySize: UnwindSafe + RefUnwindSafe,
u16: UnwindSafe + RefUnwindSafe,
SegmentIndex: UnwindSafe + RefUnwindSafe,
Option<SegmentCommitment>: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
Option<Vec<SegmentHeader>>: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
Option<PublicKey>: UnwindSafe + RefUnwindSafe,
ChainConstants: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SubspaceApi<__SrApiBlock__, PublicKey> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
PotParameters: UnwindSafe + RefUnwindSafe,
SolutionRanges: UnwindSafe + RefUnwindSafe,
SignedVote<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, PublicKey>: UnwindSafe + RefUnwindSafe,
HistorySize: UnwindSafe + RefUnwindSafe,
u16: UnwindSafe + RefUnwindSafe,
SegmentIndex: UnwindSafe + RefUnwindSafe,
Option<SegmentCommitment>: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
Option<Vec<SegmentHeader>>: UnwindSafe + RefUnwindSafe,
bool: UnwindSafe + RefUnwindSafe,
Option<PublicKey>: UnwindSafe + RefUnwindSafe,
ChainConstants: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
source§fn pot_parameters(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<PotParameters, ApiError>
fn pot_parameters( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<PotParameters, ApiError>
Proof of time parameters
source§fn solution_ranges(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<SolutionRanges, ApiError>
fn solution_ranges( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<SolutionRanges, ApiError>
Solution ranges.
source§fn submit_vote_extrinsic(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
signed_vote: SignedVote<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, RewardAddress>,
) -> Result<(), ApiError>
fn submit_vote_extrinsic( &self, __runtime_api_at_param__: <Block as Block>::Hash, signed_vote: SignedVote<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, RewardAddress>, ) -> Result<(), ApiError>
Submit farmer vote vote that is essentially a header with bigger solution range than
acceptable for block authoring. Only useful in an offchain context.
source§fn history_size(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<HistorySize, ApiError>
fn history_size( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<HistorySize, ApiError>
Size of the blockchain history
source§fn max_pieces_in_sector(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<u16, ApiError>
fn max_pieces_in_sector( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u16, ApiError>
How many pieces one sector is supposed to contain (max)
source§fn segment_commitment(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
segment_index: SegmentIndex,
) -> Result<Option<SegmentCommitment>, ApiError>
fn segment_commitment( &self, __runtime_api_at_param__: <Block as Block>::Hash, segment_index: SegmentIndex, ) -> Result<Option<SegmentCommitment>, ApiError>
Get the segment commitment of records for specified segment index
source§fn extract_segment_headers(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
ext: &<Block as Block>::Extrinsic,
) -> Result<Option<Vec<SegmentHeader>>, ApiError>
fn extract_segment_headers( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<Vec<SegmentHeader>>, ApiError>
Returns
Vec<SegmentHeader>
if a given extrinsic has them.source§fn is_inherent(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
ext: &<Block as Block>::Extrinsic,
) -> Result<bool, ApiError>
fn is_inherent( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<bool, ApiError>
Checks if the extrinsic is an inherent.
source§fn root_plot_public_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<Option<PublicKey>, ApiError>
fn root_plot_public_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Option<PublicKey>, ApiError>
Returns root plot public key in case block authoring is restricted.
source§fn should_adjust_solution_range(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<bool, ApiError>
fn should_adjust_solution_range( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<bool, ApiError>
Whether solution range adjustment is enabled.
source§fn chain_constants(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<ChainConstants, ApiError>
fn chain_constants( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<ChainConstants, ApiError>
Get Subspace blockchain constants
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TaggedTransactionQueue<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TaggedTransactionQueue<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
<__SrApiBlock__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
§fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
tx: <Block as Block>::Extrinsic,
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_2( &self, __runtime_api_at_param__: <Block as Block>::Hash, tx: <Block as Block>::Extrinsic, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
👎Deprecated
Validate the transaction.
§fn validate_transaction_before_version_3(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_3( &self, __runtime_api_at_param__: <Block as Block>::Hash, source: TransactionSource, tx: <Block as Block>::Extrinsic, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
👎Deprecated
Validate the transaction.
§fn validate_transaction(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash,
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction( &self, __runtime_api_at_param__: <Block as Block>::Hash, source: TransactionSource, tx: <Block as Block>::Extrinsic, block_hash: <Block as Block>::Hash, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction. Read more
source§impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TransactionPaymentApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
Weight: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TransactionPaymentApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
<__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
Weight: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
__SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,
fn query_info( &self, __runtime_api_at_param__: <Block as Block>::Hash, uxt: <Block as Block>::Extrinsic, len: u32, ) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_fee_details( &self, __runtime_api_at_param__: <Block as Block>::Hash, uxt: <Block as Block>::Extrinsic, len: u32, ) -> Result<FeeDetails<Balance>, ApiError>
fn query_weight_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, weight: Weight, ) -> Result<Balance, ApiError>
fn query_length_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, length: u32, ) -> Result<Balance, ApiError>
Auto Trait Implementations§
impl<Block, C> !Freeze for RuntimeApiImpl<Block, C>
impl<Block, C> !RefUnwindSafe for RuntimeApiImpl<Block, C>
impl<Block, C> Send for RuntimeApiImpl<Block, C>where
C: Sync,
impl<Block, C> !Sync for RuntimeApiImpl<Block, C>
impl<Block, C> Unpin for RuntimeApiImpl<Block, C>
impl<Block, C> !UnwindSafe for RuntimeApiImpl<Block, C>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.