referrerpolicy=no-referrer-when-downgrade
staging_xcm_executor::traits

Trait AssetExchange

Source
pub trait AssetExchange {
    // Required methods
    fn exchange_asset(
        origin: Option<&Location>,
        give: AssetsInHolding,
        want: &Assets,
        maximal: bool,
    ) -> Result<AssetsInHolding, AssetsInHolding>;
    fn quote_exchange_price(
        _give: &Assets,
        _want: &Assets,
        _maximal: bool,
    ) -> Option<Assets>;
}
Expand description

A service for exchanging assets.

Required Methods§

Source

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Handler for exchanging an asset.

  • origin: The location attempting the exchange; this should generally not matter.
  • give: The assets which have been removed from the caller.
  • want: The minimum amount of assets which should be given to the caller in case any exchange happens. If more assets are provided, then they should generally be of the same asset class if at all possible.
  • maximal: If true, then as much as possible should be exchanged.

Ok is returned along with the new set of assets which have been exchanged for give. At least want must be in the set. Some assets originally in give may also be in this set. In the case of returning an Err, then give is returned.

Source

fn quote_exchange_price( _give: &Assets, _want: &Assets, _maximal: bool, ) -> Option<Assets>

Handler for quoting the exchange price of two asset collections.

It’s useful before calling exchange_asset, to get some information on whether or not the exchange will be successful.

Arguments:

  • give The asset(s) that are going to be given.
  • want The asset(s) that are wanted.
  • maximal: - If true, then the return value is the resulting amount of want obtained by swapping give.
    • If false, then the return value is the required amount of give needed to get want.

The return value is Assets since it comprises both which assets and how much of them.

The relationship between this function and exchange_asset is the following:

  • quote(give, want, maximal) = resulting_want -> exchange(give, resulting_want, maximal) ✅
  • quote(give, want, minimal) = required_give -> exchange(required_give_amount, want, minimal) ✅

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AssetExchange for ()

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange> AssetExchange for (TupleElement0,)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange> AssetExchange for (TupleElement0, TupleElement1)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange, TupleElement28: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Source§

impl<TupleElement0: AssetExchange, TupleElement1: AssetExchange, TupleElement2: AssetExchange, TupleElement3: AssetExchange, TupleElement4: AssetExchange, TupleElement5: AssetExchange, TupleElement6: AssetExchange, TupleElement7: AssetExchange, TupleElement8: AssetExchange, TupleElement9: AssetExchange, TupleElement10: AssetExchange, TupleElement11: AssetExchange, TupleElement12: AssetExchange, TupleElement13: AssetExchange, TupleElement14: AssetExchange, TupleElement15: AssetExchange, TupleElement16: AssetExchange, TupleElement17: AssetExchange, TupleElement18: AssetExchange, TupleElement19: AssetExchange, TupleElement20: AssetExchange, TupleElement21: AssetExchange, TupleElement22: AssetExchange, TupleElement23: AssetExchange, TupleElement24: AssetExchange, TupleElement25: AssetExchange, TupleElement26: AssetExchange, TupleElement27: AssetExchange, TupleElement28: AssetExchange, TupleElement29: AssetExchange> AssetExchange for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11, TupleElement12, TupleElement13, TupleElement14, TupleElement15, TupleElement16, TupleElement17, TupleElement18, TupleElement19, TupleElement20, TupleElement21, TupleElement22, TupleElement23, TupleElement24, TupleElement25, TupleElement26, TupleElement27, TupleElement28, TupleElement29)

Source§

fn exchange_asset( origin: Option<&Location>, give: AssetsInHolding, want: &Assets, maximal: bool, ) -> Result<AssetsInHolding, AssetsInHolding>

Source§

fn quote_exchange_price( give: &Assets, want: &Assets, maximal: bool, ) -> Option<Assets>

Implementors§

impl<AssetConversion, Fungibles, Matcher, AccountId> AssetExchange for SingleAssetExchangeAdapter<AssetConversion, Fungibles, Matcher, AccountId>
where AssetConversion: SwapCredit<AccountId, Balance = u128, AssetKind = Fungibles::AssetId, Credit = Credit<AccountId, Fungibles>> + QuotePrice<Balance = u128, AssetKind = Fungibles::AssetId>, Fungibles: Balanced<AccountId, Balance = u128>, Matcher: MatchesFungibles<Fungibles::AssetId, Fungibles::Balance>,