pub enum Instruction<RuntimeCall> {
Show 28 variants WithdrawAsset(MultiAssets), ReserveAssetDeposited(MultiAssets), ReceiveTeleportedAsset(MultiAssets), QueryResponse { query_id: QueryId, response: Response, max_weight: u64, }, TransferAsset { assets: MultiAssets, beneficiary: MultiLocation, }, TransferReserveAsset { assets: MultiAssets, dest: MultiLocation, xcm: Xcm<()>, }, Transact { origin_type: OriginKind, require_weight_at_most: u64, call: DoubleEncoded<RuntimeCall>, }, HrmpNewChannelOpenRequest { sender: u32, max_message_size: u32, max_capacity: u32, }, HrmpChannelAccepted { recipient: u32, }, HrmpChannelClosing { initiator: u32, sender: u32, recipient: u32, }, ClearOrigin, DescendOrigin(InteriorMultiLocation), ReportError { query_id: QueryId, dest: MultiLocation, max_response_weight: u64, }, DepositAsset { assets: MultiAssetFilter, max_assets: u32, beneficiary: MultiLocation, }, DepositReserveAsset { assets: MultiAssetFilter, max_assets: u32, dest: MultiLocation, xcm: Xcm<()>, }, ExchangeAsset { give: MultiAssetFilter, receive: MultiAssets, }, InitiateReserveWithdraw { assets: MultiAssetFilter, reserve: MultiLocation, xcm: Xcm<()>, }, InitiateTeleport { assets: MultiAssetFilter, dest: MultiLocation, xcm: Xcm<()>, }, QueryHolding { query_id: QueryId, dest: MultiLocation, assets: MultiAssetFilter, max_response_weight: u64, }, BuyExecution { fees: MultiAsset, weight_limit: WeightLimit, }, RefundSurplus, SetErrorHandler(Xcm<RuntimeCall>), SetAppendix(Xcm<RuntimeCall>), ClearError, ClaimAsset { assets: MultiAssets, ticket: MultiLocation, }, Trap(u64), SubscribeVersion { query_id: QueryId, max_response_weight: u64, }, UnsubscribeVersion,
}
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
Expand description

Cross-Consensus Message: A message from one consensus system to another.

Consensus systems that may send and receive messages include blockchains and smart contracts.

All messages are delivered from a known origin, expressed as a MultiLocation.

This is the inner XCM format and is version-sensitive. Messages are typically passed using the outer XCM format, known as VersionedXcm.

Variants§

§

WithdrawAsset(MultiAssets)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Withdraw asset(s) (assets) from the ownership of origin and place them into the Holding Register.

  • assets: The asset(s) to be withdrawn into holding.

Kind: Command.

Errors:

§

ReserveAssetDeposited(MultiAssets)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Asset(s) (assets) have been received into the ownership of this system on the origin system and equivalent derivatives should be placed into the Holding Register.

  • assets: The asset(s) that are minted into holding.

Safety: origin must be trusted to have received and be storing assets such that they may later be withdrawn should this system send a corresponding message.

Kind: Trusted Indication.

Errors:

§

ReceiveTeleportedAsset(MultiAssets)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Asset(s) (assets) have been destroyed on the origin system and equivalent assets should be created and placed into the Holding Register.

  • assets: The asset(s) that are minted into the Holding Register.

Safety: origin must be trusted to have irrevocably destroyed the corresponding assets prior as a consequence of sending this message.

Kind: Trusted Indication.

Errors:

§

QueryResponse

Fields

§query_id: QueryId
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§response: Response
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_weight: u64
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Respond with information that the local system is expecting.

  • query_id: The identifier of the query that resulted in this message being sent.
  • response: The message content.
  • max_weight: The maximum weight that handling this response should take.

Safety: No concerns.

Kind: Information.

Errors:

§

TransferAsset

Fields

§assets: MultiAssets
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§beneficiary: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Withdraw asset(s) (assets) from the ownership of origin and place equivalent assets under the ownership of beneficiary.

  • assets: The asset(s) to be withdrawn.
  • beneficiary: The new owner for the assets.

Safety: No concerns.

Kind: Command.

Errors:

§

TransferReserveAsset

Fields

§assets: MultiAssets
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§dest: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§xcm: Xcm<()>
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Withdraw asset(s) (assets) from the ownership of origin and place equivalent assets under the ownership of dest within this consensus system (i.e. its sovereign account).

Send an onward XCM message to dest of ReserveAssetDeposited with the given xcm.

  • assets: The asset(s) to be withdrawn.
  • dest: The location whose sovereign account will own the assets and thus the effective beneficiary for the assets and the notification target for the reserve asset deposit message.
  • xcm: The instructions that should follow the ReserveAssetDeposited instruction, which is sent onwards to dest.

Safety: No concerns.

Kind: Command.

Errors:

§

Transact

Fields

§origin_type: OriginKind
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§require_weight_at_most: u64
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§call: DoubleEncoded<RuntimeCall>
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Apply the encoded transaction call, whose dispatch-origin should be origin as expressed by the kind of origin origin_type.

  • origin_type: The means of expressing the message origin as a dispatch origin.
  • max_weight: The weight of call; this should be at least the chain’s calculated weight and will be used in the weight determination arithmetic.
  • call: The encoded transaction to be applied.

Safety: No concerns.

Kind: Command.

Errors:

§

HrmpNewChannelOpenRequest

Fields

§sender: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_message_size: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_capacity: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

A message to notify about a new incoming HRMP channel. This message is meant to be sent by the relay-chain to a para.

  • sender: The sender in the to-be opened channel. Also, the initiator of the channel opening.
  • max_message_size: The maximum size of a message proposed by the sender.
  • max_capacity: The maximum number of messages that can be queued in the channel.

Safety: The message should originate directly from the relay-chain.

Kind: System Notification

§

HrmpChannelAccepted

Fields

§recipient: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

A message to notify about that a previously sent open channel request has been accepted by the recipient. That means that the channel will be opened during the next relay-chain session change. This message is meant to be sent by the relay-chain to a para.

Safety: The message should originate directly from the relay-chain.

Kind: System Notification

Errors:

§

HrmpChannelClosing

Fields

§initiator: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§sender: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§recipient: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

A message to notify that the other party in an open channel decided to close it. In particular, initiator is going to close the channel opened from sender to the recipient. The close will be enacted at the next relay-chain session change. This message is meant to be sent by the relay-chain to a para.

Safety: The message should originate directly from the relay-chain.

Kind: System Notification

Errors:

§

ClearOrigin

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Clear the origin.

This may be used by the XCM author to ensure that later instructions cannot command the authority of the origin (e.g. if they are being relayed from an untrusted source, as often the case with ReserveAssetDeposited).

Safety: No concerns.

Kind: Command.

Errors:

§

DescendOrigin(InteriorMultiLocation)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Mutate the origin to some interior location.

Kind: Command

Errors:

§

ReportError

Fields

§query_id: QueryId
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§dest: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_response_weight: u64
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Immediately report the contents of the Error Register to the given destination via XCM.

A QueryResponse message of type ExecutionOutcome is sent to dest with the given query_id and the outcome of the XCM.

  • query_id: An identifier that will be replicated into the returned XCM message.
  • dest: A valid destination for the returned XCM message.
  • max_response_weight: The maximum amount of weight that the QueryResponse item which is sent as a reply may take to execute. NOTE: If this is unexpectedly large then the response may not execute at all.

Kind: Command

Errors:

§

DepositAsset

Fields

§assets: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_assets: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§beneficiary: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Remove the asset(s) (assets) from the Holding Register and place equivalent assets under the ownership of beneficiary within this consensus system.

  • assets: The asset(s) to remove from holding.
  • max_assets: The maximum number of unique assets/asset instances to remove from holding. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.
  • beneficiary: The new owner for the assets.

Kind: Command

Errors:

§

DepositReserveAsset

Fields

§assets: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_assets: u32
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§dest: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§xcm: Xcm<()>
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Remove the asset(s) (assets) from the Holding Register and place equivalent assets under the ownership of dest within this consensus system (i.e. deposit them into its sovereign account).

Send an onward XCM message to dest of ReserveAssetDeposited with the given effects.

  • assets: The asset(s) to remove from holding.
  • max_assets: The maximum number of unique assets/asset instances to remove from holding. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.
  • dest: The location whose sovereign account will own the assets and thus the effective beneficiary for the assets and the notification target for the reserve asset deposit message.
  • xcm: The orders that should follow the ReserveAssetDeposited instruction which is sent onwards to dest.

Kind: Command

Errors:

§

ExchangeAsset

Fields

§give: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§receive: MultiAssets
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Remove the asset(s) (give) from the Holding Register and replace them with alternative assets.

The minimum amount of assets to be received into the Holding Register for the order not to fail may be stated.

  • give: The asset(s) to remove from holding.
  • receive: The minimum amount of assets(s) which give should be exchanged for.

Kind: Command

Errors:

§

InitiateReserveWithdraw

Fields

§assets: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§reserve: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§xcm: Xcm<()>
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Remove the asset(s) (assets) from holding and send a WithdrawAsset XCM message to a reserve location.

  • assets: The asset(s) to remove from holding.
  • reserve: A valid location that acts as a reserve for all asset(s) in assets. The sovereign account of this consensus system on the reserve location will have appropriate assets withdrawn and effects will be executed on them. There will typically be only one valid location on any given asset/chain combination.
  • xcm: The instructions to execute on the assets once withdrawn on the reserve location.

Kind: Command

Errors:

§

InitiateTeleport

Fields

§assets: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§dest: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§xcm: Xcm<()>
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Remove the asset(s) (assets) from holding and send a ReceiveTeleportedAsset XCM message to a dest location.

  • assets: The asset(s) to remove from holding.
  • dest: A valid location that respects teleports coming from this location.
  • xcm: The instructions to execute on the assets once arrived on the destination location.

NOTE: The dest location MUST respect this origin as a valid teleportation origin for all assets. If it does not, then the assets may be lost.

Kind: Command

Errors:

§

QueryHolding

Fields

§query_id: QueryId
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§dest: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§assets: MultiAssetFilter
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_response_weight: u64
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Send a Balances XCM message with the assets value equal to the holding contents, or a portion thereof.

  • query_id: An identifier that will be replicated into the returned XCM message.
  • dest: A valid destination for the returned XCM message. This may be limited to the current origin.
  • assets: A filter for the assets that should be reported back. The assets reported back will be, asset-wise, the lesser of this value and the holding register. No wildcards will be used when reporting assets back.
  • max_response_weight: The maximum amount of weight that the QueryResponse item which is sent as a reply may take to execute. NOTE: If this is unexpectedly large then the response may not execute at all.

Kind: Command

Errors:

§

BuyExecution

Fields

§fees: MultiAsset
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§weight_limit: WeightLimit
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Pay for the execution of some XCM xcm and orders with up to weight picoseconds of execution time, paying for this with up to fees from the Holding Register.

  • fees: The asset(s) to remove from the Holding Register to pay for fees.
  • weight_limit: The maximum amount of weight to purchase; this must be at least the expected maximum weight of the total XCM to be executed for the AllowTopLevelPaidExecutionFrom barrier to allow the XCM be executed.

Kind: Command

Errors:

§

RefundSurplus

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Refund any surplus weight previously bought with BuyExecution.

Kind: Command

Errors: None.

§

SetErrorHandler(Xcm<RuntimeCall>)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Set the Error Handler Register. This is code that should be called in the case of an error happening.

An error occurring within execution of this code will NOT result in the error register being set, nor will an error handler be called due to it. The error handler and appendix may each still be set.

The apparent weight of this instruction is inclusive of the inner Xcm; the executing weight however includes only the difference between the previous handler and the new handler, which can reasonably be negative, which would result in a surplus.

Kind: Command

Errors: None.

§

SetAppendix(Xcm<RuntimeCall>)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Set the Appendix Register. This is code that should be called after code execution (including the error handler if any) is finished. This will be called regardless of whether an error occurred.

Any error occurring due to execution of this code will result in the error register being set, and the error handler (if set) firing.

The apparent weight of this instruction is inclusive of the inner Xcm; the executing weight however includes only the difference between the previous appendix and the new appendix, which can reasonably be negative, which would result in a surplus.

Kind: Command

Errors: None.

§

ClearError

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Clear the Error Register.

Kind: Command

Errors: None.

§

ClaimAsset

Fields

§assets: MultiAssets
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§ticket: MultiLocation
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Create some assets which are being held on behalf of the origin.

  • assets: The assets which are to be claimed. This must match exactly with the assets claimable by the origin of the ticket.
  • ticket: The ticket of the asset; this is an abstract identifier to help locate the asset.

Kind: Command

Errors:

§

Trap(u64)

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Always throws an error of type Trap.

Kind: Command

Errors:

  • Trap: All circumstances, whose inner value is the same as this item’s inner value.
§

SubscribeVersion

Fields

§query_id: QueryId
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
§max_response_weight: u64
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Ask the destination system to respond with the most recent version of XCM that they support in a QueryResponse instruction. Any changes to this should also elicit similar responses when they happen.

  • query_id: An identifier that will be replicated into the returned XCM message.
  • max_response_weight: The maximum amount of weight that the QueryResponse item which is sent as a reply may take to execute. NOTE: If this is unexpectedly large then the response may not execute at all.

Kind: Command

Errors: Fallible

§

UnsubscribeVersion

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Cancel the effect of a previous SubscribeVersion instruction.

Kind: Command

Errors: Fallible

Implementations§

source§

impl<RuntimeCall> Instruction<RuntimeCall>

source

pub fn into<C>(self) -> Instruction<C>

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
source

pub fn from<C>(xcm: Instruction<C>) -> Self

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.

Trait Implementations§

source§

impl<RuntimeCall> Clone for Instruction<RuntimeCall>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<RuntimeCall> Debug for Instruction<RuntimeCall>

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<RuntimeCall> Decode for Instruction<RuntimeCall>

source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<RuntimeCall> Encode for Instruction<RuntimeCall>

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl<RuntimeCall, W: XcmWeightInfo<RuntimeCall>> GetWeight<W> for Instruction<RuntimeCall>

source§

fn weight(&self) -> Weight

👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
source§

impl<RuntimeCall> PartialEq for Instruction<RuntimeCall>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Call> TryFrom<Instruction<Call>> for Instruction<Call>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(old_instruction: OldInstruction<Call>) -> Result<Self, ()>

Performs the conversion.
source§

impl<RuntimeCall> TryFrom<Instruction<RuntimeCall>> for Instruction<RuntimeCall>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(instruction: NewInstruction<RuntimeCall>) -> Result<Self, ()>

Performs the conversion.
source§

impl<RuntimeCall> TypeInfo for Instruction<RuntimeCall>
where RuntimeCall: 'static,

§

type Identity = Instruction<RuntimeCall>

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl<RuntimeCall> EncodeLike for Instruction<RuntimeCall>

source§

impl<RuntimeCall> Eq for Instruction<RuntimeCall>

Auto Trait Implementations§

§

impl<RuntimeCall> RefUnwindSafe for Instruction<RuntimeCall>
where RuntimeCall: RefUnwindSafe,

§

impl<RuntimeCall> Send for Instruction<RuntimeCall>
where RuntimeCall: Send,

§

impl<RuntimeCall> Sync for Instruction<RuntimeCall>
where RuntimeCall: Sync,

§

impl<RuntimeCall> Unpin for Instruction<RuntimeCall>
where RuntimeCall: Unpin,

§

impl<RuntimeCall> UnwindSafe for Instruction<RuntimeCall>
where RuntimeCall: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> DecodeAll for T
where T: Decode,

§

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
§

impl<T> DecodeLimit for T
where T: Decode,

§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8] ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> KeyedVec for T
where T: Codec,

§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>

Return an encoding of Self prepended by given slice.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> SaturatedConversion for T

source§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
source§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<S> Codec for S
where S: Decode + Encode,

§

impl<T> EncodeLike<&&T> for T
where T: Encode,

§

impl<T> EncodeLike<&T> for T
where T: Encode,

§

impl<T> EncodeLike<&mut T> for T
where T: Encode,

§

impl<T> EncodeLike<Arc<T>> for T
where T: Encode,

§

impl<T> EncodeLike<Box<T>> for T
where T: Encode,

§

impl<'a, T> EncodeLike<Cow<'a, T>> for T
where T: ToOwned + Encode,

§

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

§

impl<S> FullCodec for S
where S: Decode + FullEncode,

§

impl<S> FullEncode for S
where S: Encode + EncodeLike,

§

impl<T> JsonSchemaMaybe for T

§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,