Enum xcm::v1::Order [−][src]
pub enum Order<Call> {
Noop,
DepositAsset {
assets: MultiAssetFilter,
max_assets: u32,
beneficiary: MultiLocation,
},
DepositReserveAsset {
assets: MultiAssetFilter,
max_assets: u32,
dest: MultiLocation,
effects: Vec<Order<()>>,
},
ExchangeAsset {
give: MultiAssetFilter,
receive: MultiAssets,
},
InitiateReserveWithdraw {
assets: MultiAssetFilter,
reserve: MultiLocation,
effects: Vec<Order<()>>,
},
InitiateTeleport {
assets: MultiAssetFilter,
dest: MultiLocation,
effects: Vec<Order<()>>,
},
QueryHolding {
query_id: u64,
dest: MultiLocation,
assets: MultiAssetFilter,
},
BuyExecution {
fees: MultiAsset,
weight: u64,
debt: u64,
halt_on_error: bool,
instructions: Vec<Xcm<Call>>,
},
}Expand description
An instruction to be executed on some or all of the assets in holding, used by asset-related XCM messages.
Variants
Do nothing. Not generally used.
Remove the asset(s) (assets) from holding 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 firstmax_assetsassets/instances of those matched byassetswill be removed, prioritized under standard asset ordering. Any others will remain in holding.beneficiary: The new owner for the assets.
Errors:
Fields of DepositAsset
Remove the asset(s) (assets) from holding 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 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 firstmax_assetsassets/instances of those matched byassetswill 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.effects: The orders that should be contained in theReserveAssetDepositedwhich is sent onwards todest.
Errors:
Fields of DepositReserveAsset
Remove the asset(s) (give) from holding and replace them with alternative assets.
The minimum amount of assets to be received into holding for the order not to fail may be stated.
give: The asset(s) to remove from holding.receive: The minimum amount of assets(s) whichgiveshould be exchanged for.
Errors:
Fields of ExchangeAsset
give: MultiAssetFilterreceive: MultiAssetsRemove 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) inassets. The sovereign account of this consensus system on the reserve location will have appropriate assets withdrawn andeffectswill be executed on them. There will typically be only one valid location on any given asset/chain combination.effects: The orders to execute on the assets once withdrawn on the reserve location.
Errors:
Fields of InitiateReserveWithdraw
Remove the asset(s) (assets) from holding and send a ReceiveTeleportedAsset XCM message to a destination
location.
assets: The asset(s) to remove from holding.destination: A valid location that has a bi-lateral teleportation arrangement.effects: The orders to execute on the assets once arrived on the destination location.
NOTE: The destination location MUST respect this origin as a valid teleportation origin for all assets.
If it does not, then the assets may be lost.
Errors:
Fields of InitiateTeleport
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.
Errors:
Fields of QueryHolding
Pay for the execution of some XCM instructions 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 holding to pay for fees.weight: The amount of weight to purchase; this should be at least the shallow weight ofeffectsandxcm.debt: The amount of weight-debt already incurred to be paid off; this should be equal to the unpaid weight of any surrounding operations/orders.halt_on_error: Iftrue, the execution of theordersandoperationswill halt on the first failure. Iffalse, then execution will continue regardless.instructions: XCM instructions to be executed outside of the context of the current Holding Register; execution of these instructions happens AFTER the execution of theorders. The (shallow) weight for these must be paid for with theweightpurchased. Errors:
Fields of BuyExecution
Implementations
Trait Implementations
Auto Trait Implementations
impl<Call> RefUnwindSafe for Order<Call> where
Call: RefUnwindSafe,
impl<Call> UnwindSafe for Order<Call> where
Call: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when
Debug-formatted. Read more
Causes self to use its LowerExp implementation when
Debug-formatted. Read more
Causes self to use its LowerHex implementation when
Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when
Debug-formatted. Read more
Causes self to use its UpperExp implementation when
Debug-formatted. Read more
Causes self to use its UpperHex implementation when
Debug-formatted. Read more
Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe
function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe
function. Read more
Borrows self, then passes self.deref() into the pipe function.
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release
builds. Read more
Provides immutable access to the reference for inspection.
Calls tap_ref in debug builds, and does nothing in release builds.
Provides mutable access to the reference for modification.
Calls tap_ref_mut in debug builds, and does nothing in release builds.
Provides immutable access to the borrow for inspection. Read more
Calls tap_borrow in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
Immutably dereferences self for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self for modification.