Struct even2::EventDispatcher
source · pub struct EventDispatcher(/* private fields */);
Implementations§
source§impl EventDispatcher
impl EventDispatcher
pub fn new() -> EventDispatcher
pub fn add_event_listener<E, F>(&mut self, f: F)where E: Event, F: FnMut(&E) + 'static,
pub fn clear<E: Event>(&mut self)
pub fn clear_all(&mut self)
pub fn trigger<E: Event>(&mut self, event: &E)
pub fn trigger_dyn(&mut self, event: &dyn Event)
Auto Trait Implementations§
impl !RefUnwindSafe for EventDispatcher
impl !Send for EventDispatcher
impl !Sync for EventDispatcher
impl Unpin for EventDispatcher
impl !UnwindSafe for EventDispatcher
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