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§
Sourcefn send_upward_message(
message: UpwardMessage,
) -> Result<(u32, XcmHash), MessageSendError>
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
Sourcefn can_send_upward_message(
message: &UpwardMessage,
) -> Result<(), MessageSendError>
fn can_send_upward_message( message: &UpwardMessage, ) -> Result<(), MessageSendError>
Pre-check the given UMP message.
Provided Methods§
Sourcefn ensure_successful_delivery()
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.