referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait HandleMessage

Source
pub trait HandleMessage {
    type MaxMessageLen: Get<u32>;

    // Required methods
    fn handle_message(message: BoundedSlice<'_, u8, Self::MaxMessageLen>);
    fn handle_messages<'a>(
        messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>,
    );
    fn sweep_queue();
    fn footprint() -> QueueFootprint;
}
Expand description

Handles incoming messages for a single origin.

Required Associated Types§

Source

type MaxMessageLen: Get<u32>

The maximal length any enqueued message may have.

Required Methods§

Source

fn handle_message(message: BoundedSlice<'_, u8, Self::MaxMessageLen>)

Enqueue a single message with an implied origin.

Source

fn handle_messages<'a>( messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>, )

Enqueue multiple messages from an implied origin.

Source

fn sweep_queue()

Any remaining unprocessed messages should happen only lazily, not proactively.

Source

fn footprint() -> QueueFootprint

Return the state footprint of the queue.

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§