[][src]Struct kagura::Events

pub struct Events<Msg> {
    pub handlers: HashMap<String, Box<dyn FnMut(Event) -> Msg>>,
}

Events for Html

Fields

handlers: HashMap<String, Box<dyn FnMut(Event) -> Msg>>

Methods

impl<Msg> Events<Msg>[src]

pub fn new() -> Self[src]

Creates new empty Events

pub fn on(
    self,
    type_: impl Into<String>,
    handler: impl FnMut(Event) -> Msg + 'static
) -> Self
[src]

Adds event handler

pub fn on_click(self, handler: impl FnMut(MouseEvent) -> Msg + 'static) -> Self[src]

pub fn on_contextmenu(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_dblclick(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mousedown(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mouseenter(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mouseleave(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mousemove(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mouseover(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mouseout(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_mouseup(
    self,
    handler: impl FnMut(MouseEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_drag(self, handler: impl FnMut(DragEvent) -> Msg + 'static) -> Self[src]

pub fn on_dragend(self, handler: impl FnMut(DragEvent) -> Msg + 'static) -> Self[src]

pub fn on_dragenter(
    self,
    handler: impl FnMut(DragEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_dragstart(
    self,
    handler: impl FnMut(DragEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_dragleave(
    self,
    handler: impl FnMut(DragEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_dragover(
    self,
    handler: impl FnMut(DragEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_drop(self, handler: impl FnMut(DragEvent) -> Msg + 'static) -> Self[src]

pub fn on_keydown(
    self,
    handler: impl FnMut(KeyboardEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_keypress(
    self,
    handler: impl FnMut(KeyboardEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_keyup(
    self,
    handler: impl FnMut(KeyboardEvent) -> Msg + 'static
) -> Self
[src]

pub fn on_input(self, handler: impl FnMut(String) -> Msg + 'static) -> Self[src]

Auto Trait Implementations

impl<Msg> !Send for Events<Msg>

impl<Msg> Unpin for Events<Msg>

impl<Msg> !Sync for Events<Msg>

impl<Msg> !UnwindSafe for Events<Msg>

impl<Msg> !RefUnwindSafe for Events<Msg>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,