Trait frame_support::traits::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§
sourcetype MaxMessageLen: Get<u32>
type MaxMessageLen: Get<u32>
The maximal length any enqueued message may have.
Required Methods§
sourcefn handle_message(message: BoundedSlice<'_, u8, Self::MaxMessageLen>)
fn handle_message(message: BoundedSlice<'_, u8, Self::MaxMessageLen>)
Enqueue a single message
with an implied origin.
sourcefn handle_messages<'a>(
messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>,
)
fn handle_messages<'a>( messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>, )
Enqueue multiple messages
from an implied origin.
sourcefn sweep_queue()
fn sweep_queue()
Any remaining unprocessed messages should happen only lazily, not proactively.
sourcefn footprint() -> QueueFootprint
fn footprint() -> QueueFootprint
Return the state footprint of the queue.
Object Safety§
This trait is not object safe.