Trait frame_support::traits::EnqueueMessage
source · pub trait EnqueueMessage<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§
sourcetype MaxMessageLen: Get<u32>
type MaxMessageLen: Get<u32>
The maximal length any enqueued message may have.
Required Methods§
sourcefn 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
.
sourcefn 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
.
sourcefn sweep_queue(origin: Origin)
fn sweep_queue(origin: Origin)
Any remaining unprocessed messages should happen only lazily, not proactively.
sourcefn 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.