referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait ProcessMessage

Source
pub trait ProcessMessage {
    type Origin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug;

    // Required method
    fn process_message(
        message: &[u8],
        origin: Self::Origin,
        meter: &mut WeightMeter,
        id: &mut [u8; 32],
    ) -> Result<bool, ProcessMessageError>;
}
Expand description

Can process messages from a specific origin.

Required Associated Types§

Source

type Origin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug

The transport from where a message originates.

Required Methods§

Source

fn process_message( message: &[u8], origin: Self::Origin, meter: &mut WeightMeter, id: &mut [u8; 32], ) -> Result<bool, ProcessMessageError>

Process the given message, using no more than the remaining meter weight to do so.

Returns whether the message was processed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§