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

Examples

use bitflags::bitflags;

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

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

Required methods

Get the u32 bitmask.

Implementors