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() -> Footprint;
}
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() -> Footprint

Return the state footprint of the queue.

Implementors§