referrerpolicy=no-referrer-when-downgrade

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>

The maximal length any enqueued message may have.

Required Methods§

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, )

Enqueue multiple messages from a specific origin.

fn sweep_queue(origin: Origin)

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

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§

§

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

§

type MaxMessageLen = ConstU32<0>

§

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

§

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

§

fn sweep_queue(_: Origin)

§

fn footprint(_: Origin) -> QueueFootprint

Implementors§

§

impl<E, O, N, C> EnqueueMessage<N> for TransformOrigin<E, O, N, C>
where E: EnqueueMessage<O>, O: MaxEncodedLen, N: MaxEncodedLen, C: Convert<N, O>,