[−][src]Struct kagura::prelude::Events
Events for Html
Fields
handlers: HashMap<String, Vec<Box<dyn FnOnce(Event) -> Box<dyn Any>>>>
rendered: Option<Box<dyn FnOnce(Element) -> Box<dyn Any>>>
Implementations
impl Events
[src]
pub fn new() -> Self
[src]
Creates new empty Events
pub fn rendered<Msg: 'static>(
self,
handler: Option<impl FnOnce(Element) -> Msg + 'static>
) -> Self
[src]
self,
handler: Option<impl FnOnce(Element) -> Msg + 'static>
) -> Self
on rendered event
pub fn on<Msg: 'static>(
self,
type_: impl Into<String>,
handler: impl FnOnce(Event) -> Msg + 'static
) -> Self
[src]
self,
type_: impl Into<String>,
handler: impl FnOnce(Event) -> Msg + 'static
) -> Self
Adds event handler
pub fn on_click<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_contextmenu<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_dblclick<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_drag<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_dragend<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_dragenter<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_dragstart<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_dragleave<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_dragover<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_drop<Msg: 'static>(
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(DragEvent) -> Msg + 'static
) -> Self
pub fn on_input<Msg: 'static>(
self,
handler: impl FnOnce(String) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(String) -> Msg + 'static
) -> Self
pub fn on_keydown<Msg: 'static>(
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
pub fn on_keypress<Msg: 'static>(
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
pub fn on_keyup<Msg: 'static>(
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(KeyboardEvent) -> Msg + 'static
) -> Self
pub fn on_load<Msg: 'static>(
self,
handler: impl FnOnce() -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce() -> Msg + 'static
) -> Self
pub fn on_mousedown<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mouseenter<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mouseleave<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mousemove<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mouseover<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mouseout<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
pub fn on_mouseup<Msg: 'static>(
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
[src]
self,
handler: impl FnOnce(MouseEvent) -> Msg + 'static
) -> Self
Trait Implementations
impl Clone for Events
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for Events
impl !Send for Events
impl !Sync for Events
impl Unpin for Events
impl !UnwindSafe for Events
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,