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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Origin> SendController<Origin> for ()

§

type WeightInfo = ()

source§

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

Implementors§