pub enum PointerSource {
Mouse,
Touch,
Stylus,
Unknown,
}Expand description
The kind of physical device that produced a pointer event.
Threaded from the platform layer (Android MotionEvent tool type, winit
PointerSource/ButtonSource, web PointerEvent.pointerType) so input
consumers can preserve device-specific gesture details while keeping shared
direct-manipulation behavior source-independent.
Variants§
Mouse
A mouse or other indirect precise pointer (desktop, web "mouse").
Touch
A finger on a touchscreen (Android finger, winit touch, web "touch").
Stylus
A stylus/pen (Android stylus/eraser, winit tablet tool, web "pen").
Unknown
The platform did not report a device type.
Implementations§
Source§impl PointerSource
impl PointerSource
Sourcepub fn is_touch_like(self) -> bool
pub fn is_touch_like(self) -> bool
Whether this source is a direct-touch device (finger or stylus), used for contact-specific release and velocity semantics.
Trait Implementations§
Source§impl Clone for PointerSource
impl Clone for PointerSource
Source§fn clone(&self) -> PointerSource
fn clone(&self) -> PointerSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PointerSource
Source§impl Debug for PointerSource
impl Debug for PointerSource
Source§impl Default for PointerSource
impl Default for PointerSource
Source§fn default() -> PointerSource
fn default() -> PointerSource
Returns the “default value” for a type. Read more
impl Eq for PointerSource
Source§impl Hash for PointerSource
impl Hash for PointerSource
Source§impl PartialEq for PointerSource
impl PartialEq for PointerSource
impl StructuralPartialEq for PointerSource
Auto Trait Implementations§
impl Freeze for PointerSource
impl RefUnwindSafe for PointerSource
impl Send for PointerSource
impl Sync for PointerSource
impl Unpin for PointerSource
impl UnsafeUnpin for PointerSource
impl UnwindSafe for PointerSource
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