referrerpolicy=no-referrer-when-downgrade

Trait UpwardMessageSender

Source
pub trait UpwardMessageSender {
    // Required methods
    fn send_upward_message(
        message: UpwardMessage,
    ) -> Result<(u32, XcmHash), MessageSendError>;
    fn can_send_upward_message(
        message: &UpwardMessage,
    ) -> Result<(), MessageSendError>;

    // Provided method
    fn ensure_successful_delivery() { ... }
}
Expand description

Something that should be called when sending an upward message.

Required Methods§

Source

fn send_upward_message( message: UpwardMessage, ) -> Result<(u32, XcmHash), MessageSendError>

Send the given UMP message; return the expected number of blocks before the message will be dispatched or an error if the message cannot be sent. return the hash of the message sent

Source

fn can_send_upward_message( message: &UpwardMessage, ) -> Result<(), MessageSendError>

Pre-check the given UMP message.

Provided Methods§

Source

fn ensure_successful_delivery()

Ensure [Self::send_upward_message] is successful when called in benchmarks/tests.

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 UpwardMessageSender for ()

Implementors§