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§

source

type MaxMessageLen: Get<u32>

The maximal length any enqueued message may have.

Required Methods§

source

fn enqueue_message( message: BoundedSlice<'_, u8, Self::MaxMessageLen>, origin: Origin, )

Enqueue a single message from a specific origin.

source

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

Enqueue multiple messages from a specific origin.

source

fn sweep_queue(origin: Origin)

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

source

fn footprint(origin: Origin) -> QueueFootprint

Return the state footprint of the given queue.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Origin: MaxEncodedLen> EnqueueMessage<Origin> for ()

§

type MaxMessageLen = ConstU32<0>

source§

fn enqueue_message(_: BoundedSlice<'_, u8, Self::MaxMessageLen>, _: Origin)

source§

fn enqueue_messages<'a>( _: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>, _: Origin, )

source§

fn sweep_queue(_: Origin)

source§

fn footprint(_: Origin) -> QueueFootprint

Implementors§