sp_messenger::endpoint

Trait Sender

source
pub trait Sender<AccountId> {
    type MessageId: Parameter + Member + Copy + Default;

    // Required method
    fn send_message(
        sender: &AccountId,
        dst_chain_id: ChainId,
        req: EndpointRequest,
    ) -> Result<Self::MessageId, DispatchError>;
}
Expand description

Sender provides abstraction on sending messages to other chains.

Required Associated Types§

source

type MessageId: Parameter + Member + Copy + Default

Unique Id of the message between dst_chain and src_chain.

Required Methods§

source

fn send_message( sender: &AccountId, dst_chain_id: ChainId, req: EndpointRequest, ) -> Result<Self::MessageId, DispatchError>

Sends a message to dst_chain_id.

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.

Implementors§