pub struct DispatchTouchEventBuilder { /* private fields */ }Expand description
Builder for DispatchTouchEvent.
Implementations§
Source§impl DispatchTouchEventBuilder
impl DispatchTouchEventBuilder
Sourcepub fn type<VALUE: Into<DispatchTouchEventTypeOption>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn type<VALUE: Into<DispatchTouchEventTypeOption>>( &mut self, value: VALUE, ) -> &mut Self
Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
Sourcepub fn touch_points<VALUE: Into<Vec<TouchPoint>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn touch_points<VALUE: Into<Vec<TouchPoint>>>( &mut self, value: VALUE, ) -> &mut Self
Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
Sourcepub fn modifiers<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn modifiers<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Sourcepub fn timestamp<VALUE: Into<TimeSinceEpoch>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn timestamp<VALUE: Into<TimeSinceEpoch>>( &mut self, value: VALUE, ) -> &mut Self
Time at which the event occurred.
Sourcepub fn build(
&self,
) -> Result<DispatchTouchEvent, DispatchTouchEventBuilderError>
pub fn build( &self, ) -> Result<DispatchTouchEvent, DispatchTouchEventBuilderError>
Trait Implementations§
Source§impl Clone for DispatchTouchEventBuilder
impl Clone for DispatchTouchEventBuilder
Source§fn clone(&self) -> DispatchTouchEventBuilder
fn clone(&self) -> DispatchTouchEventBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DispatchTouchEventBuilder
impl RefUnwindSafe for DispatchTouchEventBuilder
impl Send for DispatchTouchEventBuilder
impl Sync for DispatchTouchEventBuilder
impl Unpin for DispatchTouchEventBuilder
impl UnsafeUnpin for DispatchTouchEventBuilder
impl UnwindSafe for DispatchTouchEventBuilder
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