pub struct DispatchTable { /* private fields */ }Expand description
A table that maps string keys to handler IDs for dispatch.
Implementations§
Source§impl DispatchTable
impl DispatchTable
pub fn new() -> Self
pub fn register(&mut self, key: &str, priority: i32) -> u64
pub fn unregister(&mut self, key: &str) -> bool
pub fn lookup(&self, key: &str) -> Option<u64>
pub fn contains(&self, key: &str) -> bool
pub fn set_enabled(&mut self, key: &str, enabled: bool) -> bool
pub fn is_enabled(&self, key: &str) -> bool
pub fn count(&self) -> usize
pub fn enabled_count(&self) -> usize
pub fn keys(&self) -> Vec<&str>
pub fn by_priority(&self) -> Vec<&HandlerEntry>
pub fn clear(&mut self)
pub fn get_entry(&self, key: &str) -> Option<&HandlerEntry>
Trait Implementations§
Source§impl Clone for DispatchTable
impl Clone for DispatchTable
Source§fn clone(&self) -> DispatchTable
fn clone(&self) -> DispatchTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchTable
impl Debug for DispatchTable
Auto Trait Implementations§
impl Freeze for DispatchTable
impl RefUnwindSafe for DispatchTable
impl Send for DispatchTable
impl Sync for DispatchTable
impl Unpin for DispatchTable
impl UnsafeUnpin for DispatchTable
impl UnwindSafe for DispatchTable
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