Skip to main content

NativeEventName

Enum NativeEventName 

Source
pub enum NativeEventName {
Show 45 variants Click, DblClick, MouseDown, MouseUp, MouseMove, MouseEnter, MouseLeave, MouseOver, MouseOut, ContextMenu, Input, KeyDown, KeyUp, KeyPress, Focus, Blur, FocusIn, FocusOut, Submit, Change, Drag, DragStart, DragEnd, DragOver, DragEnter, DragLeave, Drop, TouchStart, TouchEnd, TouchMove, TouchCancel, Wheel, Copy, Cut, Paste, Play, Pause, Ended, LoadedData, CanPlay, VolumeChange, TimeUpdate, HashChange, EuvSignalUpdate, Other(String),
}
Expand description

Represents the name of a DOM event.

Covers mouse, keyboard, focus, form, drag, touch, wheel, clipboard, and media events.

Variants§

§

Click

Mouse click event.

§

DblClick

Mouse double-click event.

§

MouseDown

Mouse down event.

§

MouseUp

Mouse up event.

§

MouseMove

Mouse move event.

§

MouseEnter

Mouse enter event.

§

MouseLeave

Mouse leave event.

§

MouseOver

Mouse over event.

§

MouseOut

Mouse out event.

§

ContextMenu

Context menu event.

§

Input

Input value change event.

§

KeyDown

Key down event.

§

KeyUp

Key up event.

§

KeyPress

Key press event.

§

Focus

Focus event.

§

Blur

Blur event.

§

FocusIn

Focus in event.

§

FocusOut

Focus out event.

§

Submit

Form submit event.

§

Change

Change event for select/checkbox/radio.

§

Drag

Drag event.

§

DragStart

Drag start event.

§

DragEnd

Drag end event.

§

DragOver

Drag over event.

§

DragEnter

Drag enter event.

§

DragLeave

Drag leave event.

§

Drop

Drop event.

§

TouchStart

Touch start event.

§

TouchEnd

Touch end event.

§

TouchMove

Touch move event.

§

TouchCancel

Touch cancel event.

§

Wheel

Wheel/scroll event.

§

Copy

Copy event.

§

Cut

Cut event.

§

Paste

Paste event.

§

Play

Play media event.

§

Pause

Pause media event.

§

Ended

Media ended event.

§

LoadedData

Media loaded data event.

§

CanPlay

Media can play event.

§

VolumeChange

Volume change event.

§

TimeUpdate

Time update event.

§

HashChange

Hash change event.

§

EuvSignalUpdate

Internal euv signal update event.

§

Other(String)

A custom event with an arbitrary name.

Implementations§

Source§

impl NativeEventName

Maps each NativeEventName variant to its corresponding DOM event string.

Source

pub fn as_str(&self) -> String

Returns the string representation of this event name for DOM binding.

Trait Implementations§

Source§

impl Display for NativeEventName

Implements Display for NativeEventName by delegating to as_str.

This automatically provides the ToString trait via blanket implementation.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more