pub trait EventMask: Copy {
    fn as_bits(self) -> u32;
}
Expand description

Definition of event bits.

Implementors should be simple wrappers around u32 that allow application code to clearly differentiate the relevant event sources. Events and signals correspond to the bits of the

Example

use bitflags::bitflags;

bitflags! {
    struct Signal: u32 {
        const USB_RX = 1 << 0;
        const PRIO = 1 << 1;
        const TICK = 1 << 2;
    }
}

impl EventMask for Signal {
    fn as_bits(self) -> u32 {
        self.bits()
    }
}

Required methods

Get the u32 bitmask.

Implementors