pub struct EventListener {
pub event_type: String,
pub handler: Arc<dyn Fn(&Event, &EventContext) + Send + Sync>,
pub capture: bool,
}Expand description
Event listener with phase
Fields§
§event_type: StringEvent type (e.g., “click”, “keydown”)
handler: Arc<dyn Fn(&Event, &EventContext) + Send + Sync>Handler function
capture: boolWhether to capture
Implementations§
Auto Trait Implementations§
impl Freeze for EventListener
impl !RefUnwindSafe for EventListener
impl Send for EventListener
impl Sync for EventListener
impl Unpin for EventListener
impl !UnwindSafe for EventListener
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