Struct handler_table::HandlerTable
source · pub struct HandlerTable<const N: usize> { /* private fields */ }
Expand description
A lock-free table of event handlers.
It internally uses an array of AtomicUsize
to store the handlers.
Implementations§
source§impl<const N: usize> HandlerTable<N>
impl<const N: usize> HandlerTable<N>
sourcepub fn register_handler(&self, idx: usize, handler: Handler) -> bool
pub fn register_handler(&self, idx: usize, handler: Handler) -> bool
Registers a handler for the given index.
Auto Trait Implementations§
impl<const N: usize> RefUnwindSafe for HandlerTable<N>
impl<const N: usize> Send for HandlerTable<N>
impl<const N: usize> Sync for HandlerTable<N>
impl<const N: usize> Unpin for HandlerTable<N>
impl<const N: usize> UnwindSafe for HandlerTable<N>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more