Trait nb_executor::EventMask
source · [−]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()
}
}