Trait polkadot_sdk_frame::traits::EnqueueMessage
pub trait EnqueueMessage<Origin>where
Origin: MaxEncodedLen,{
type MaxMessageLen: Get<u32>;
// Required methods
fn enqueue_message(
message: BoundedSlice<'_, u8, Self::MaxMessageLen>,
origin: Origin,
);
fn enqueue_messages<'a>(
messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>,
origin: Origin,
);
fn sweep_queue(origin: Origin);
fn footprint(origin: Origin) -> QueueFootprint;
}
Expand description
Can enqueue messages for multiple origins.
Required Associated Types§
type MaxMessageLen: Get<u32>
type MaxMessageLen: Get<u32>
The maximal length any enqueued message may have.
Required Methods§
fn enqueue_message(
message: BoundedSlice<'_, u8, Self::MaxMessageLen>,
origin: Origin,
)
fn enqueue_message( message: BoundedSlice<'_, u8, Self::MaxMessageLen>, origin: Origin, )
Enqueue a single message
from a specific origin
.
fn enqueue_messages<'a>(
messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>,
origin: Origin,
)
fn enqueue_messages<'a>( messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>, origin: Origin, )
Enqueue multiple messages
from a specific origin
.
fn sweep_queue(origin: Origin)
fn sweep_queue(origin: Origin)
Any remaining unprocessed messages should happen only lazily, not proactively.
fn footprint(origin: Origin) -> QueueFootprint
fn footprint(origin: Origin) -> QueueFootprint
Return the state footprint of the given queue.
Object Safety§
This trait is not object safe.