pub struct EventHandler<T: 'static> { /* private fields */ }Expand description
Static descriptor for a stateful event handler.
Bundles a &'static InitCell<T> of shared state with a fn(&T, EventCtx)
user callback. Declare with the crate::event_handler! macro and pass to
EventTarget::on_with / EventTarget::on_clicked_with.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for EventHandler<T>
impl<T> !RefUnwindSafe for EventHandler<T>
impl<T> Send for EventHandler<T>
impl<T> Unpin for EventHandler<T>
impl<T> UnsafeUnpin for EventHandler<T>
impl<T> !UnwindSafe for EventHandler<T>
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