Trait esp32_simple::message::Trigger

source ·
pub trait Trigger:
    Debug
    + Eq
    + Hash
    + Sized
    + Send
    + Sync
    + 'static {
    const ALL: &[Self];

    // Required method
    fn as_u32(&self) -> u32;
}
Expand description

A trait for notification trigger types used in the inter-thread messaging system.

Implementors must be thread-safe (Send + Sync + 'static) and support equality comparison and hashing for use in HashSet collections. Each variant maps to a unique u32 bitmask for FreeRTOS task notifications.

Use the trigger_enum! macro to derive this trait automatically.

Required Associated Constants§

source

const ALL: &[Self]

A slice containing all possible trigger variants.

Required Methods§

source

fn as_u32(&self) -> u32

Returns the u32 bitmask value for this trigger.

§Returns

A non-zero u32 suitable for use as a FreeRTOS task notification bit.

Object Safety§

This trait is not object safe.

Implementors§