referrerpolicy=no-referrer-when-downgrade
staging_xcm_builder

Trait SendController

Source
pub trait SendController<Origin> {
    type WeightInfo: SendControllerWeightInfo;

    // Required method
    fn send(
        origin: Origin,
        dest: Box<VersionedLocation>,
        message: Box<VersionedXcm<()>>,
    ) -> Result<XcmHash, DispatchError>;
}
Expand description

Send an XCM from a given origin.

An implementation of that trait will handle the low-level details of dispatching an XCM, such as:

  • Validating and Converting the origin to an interior location.
  • Handling versioning.
  • Calling the internal router, which implements SendXcm.

Required Associated Types§

Source

type WeightInfo: SendControllerWeightInfo

Weight information for SendController functions.

Required Methods§

Source

fn send( origin: Origin, dest: Box<VersionedLocation>, message: Box<VersionedXcm<()>>, ) -> Result<XcmHash, DispatchError>

Send an XCM to be executed by a remote location.

§Parameters
  • origin: the origin of the call.
  • dest: the destination of the message.
  • msg: the XCM to be sent.

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<Origin> SendController<Origin> for ()

Source§

type WeightInfo = ()

Source§

fn send( _origin: Origin, _dest: Box<VersionedLocation>, _message: Box<VersionedXcm<()>>, ) -> Result<XcmHash, DispatchError>

Implementors§

impl<T: Config> SendController<<T as Config>::RuntimeOrigin> for Pallet<T>