pub struct EventHandler<K, F> { /* private fields */ }Expand description
An event handler attribute. Emits a JavaScript closure expression into a
data-topcoat-on:<event> attribute on the element. The browser scanner
wraps it in new Function('__cx', ...) to obtain a real handler.
Implementations§
Source§impl<K, F> EventHandler<K, F>where
F: EventHandlerFn,
impl<K, F> EventHandler<K, F>where
F: EventHandlerFn,
Trait Implementations§
Source§impl<K, F> AttributeViewParts for EventHandler<K, F>where
K: AttributeKeyViewParts,
impl<K, F> AttributeViewParts for EventHandler<K, F>where
K: AttributeKeyViewParts,
Source§fn into_view_parts(self, cx: &Cx, parts: &mut PartsWriter<'_>)
fn into_view_parts(self, cx: &Cx, parts: &mut PartsWriter<'_>)
Appends zero or more attributes to the view being built.
Auto Trait Implementations§
impl<K, F> !RefUnwindSafe for EventHandler<K, F>
impl<K, F> !Sync for EventHandler<K, F>
impl<K, F> !UnwindSafe for EventHandler<K, F>
impl<K, F> Freeze for EventHandler<K, F>
impl<K, F> Send for EventHandler<K, F>
impl<K, F> Unpin for EventHandler<K, F>
impl<K, F> UnsafeUnpin for EventHandler<K, F>where
K: UnsafeUnpin,
F: UnsafeUnpin,
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