pub struct PointerInfo {
pub pointer_id: Option<PointerId>,
pub persistent_device_id: Option<PersistentDeviceId>,
pub pointer_type: PointerType,
}Expand description
Identifying information about a pointer, stable across states.
Fields§
§pointer_id: Option<PointerId>Pointer ID.
PointerId::PRIMARY is reserved for the primary pointer,
so when converting platform pointer IDs on a platform that
does not reserve this value, add an offset to avoid collision.
None is for events not originating from a pointing device.
persistent_device_id: Option<PersistentDeviceId>Persistent device ID.
This should be set when the platform can identify a given pointing
device during the whole session, and associate it with events.
If this is not possible for the given event, it should be None.
pointer_type: PointerTypePointer type.
Implementations§
Source§impl PointerInfo
impl PointerInfo
Sourcepub fn is_primary_pointer(&self) -> bool
pub fn is_primary_pointer(&self) -> bool
Returns true if this is the primary pointer.
Trait Implementations§
Source§impl Clone for PointerInfo
impl Clone for PointerInfo
Source§fn clone(&self) -> PointerInfo
fn clone(&self) -> PointerInfo
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 moreSource§impl Debug for PointerInfo
impl Debug for PointerInfo
Source§impl Hash for PointerInfo
impl Hash for PointerInfo
Source§impl Ord for PointerInfo
impl Ord for PointerInfo
Source§fn cmp(&self, other: &PointerInfo) -> Ordering
fn cmp(&self, other: &PointerInfo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PointerInfo
impl PartialEq for PointerInfo
Source§impl PartialOrd for PointerInfo
impl PartialOrd for PointerInfo
impl Copy for PointerInfo
impl Eq for PointerInfo
impl StructuralPartialEq for PointerInfo
Auto Trait Implementations§
impl Freeze for PointerInfo
impl RefUnwindSafe for PointerInfo
impl Send for PointerInfo
impl Sync for PointerInfo
impl Unpin for PointerInfo
impl UnwindSafe for PointerInfo
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