pub struct EventPayload<'a> {
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
pub key: Option<&'a str>,
}Expand description
The numeric payload a native input event carries into JS. Mouse: a=x b=y c=button, d=modifier
bits | click count << 4. Wheel: a=deltaX b=deltaY. Input: key = the new value. Scroll:
a=scrollLeft b=scrollTop. Modifier bits: 1 ctrl, 2 shift, 4 alt, 8 meta.
Fields§
§a: f64§b: f64§c: f64§d: f64§key: Option<&'a str>Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for EventPayload<'a>
impl<'a> Freeze for EventPayload<'a>
impl<'a> Move for EventPayload<'a>
impl<'a> RefUnwindSafe for EventPayload<'a>
impl<'a> Send for EventPayload<'a>
impl<'a> Sync for EventPayload<'a>
impl<'a> Unpin for EventPayload<'a>
impl<'a> UnsafeUnpin for EventPayload<'a>
impl<'a> UnwindSafe for EventPayload<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more