referrerpolicy=no-referrer-when-downgrade

Function cumulus_primitives_core::opaque::send_xcm

pub fn send_xcm<T>(
    dest: Location,
    msg: Xcm<()>,
) -> Result<([u8; 32], Assets), SendError>
where T: SendXcm,
Expand description

Convenience function for using a SendXcm implementation. Just interprets the dest and wraps both in Some before passing them as mutable references into T::send_xcm.

Returns either Ok with the price of the delivery, or Err with the reason why the message could not be sent.

Generally you’ll want to validate and get the price first to ensure that the sender can pay it before actually doing the delivery.