referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::HandleMessage

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§

type MaxMessageLen: Get<u32>

The maximal length any enqueued message may have.

Required Methods§

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

Enqueue a single message with an implied origin.

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

Enqueue multiple messages from an implied origin.

fn sweep_queue()

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

fn footprint() -> QueueFootprint

Return the state footprint of the queue.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<E, O> HandleMessage for EnqueueWithOrigin<E, O>
where E: EnqueueMessage<<O as TypedGet>::Type>, O: TypedGet, <O as TypedGet>::Type: MaxEncodedLen,