pub struct PointerUpdate {
pub pointer: PointerInfo,
pub current: PointerState,
pub coalesced: Vec<PointerState>,
pub predicted: Vec<PointerState>,
}Expand description
A pointer update, along with coalesced and predicted states.
Fields§
§pointer: PointerInfoIdentifying information about pointer.
current: PointerStateCurrent state.
coalesced: Vec<PointerState>Coalesced states, ordered by time.
Coalescing is application-specific. On the web, the browser does its own coalescing, whereas on other platforms you may do your own, or forego it altogether, delivering every state.
predicted: Vec<PointerState>Predicted states, ordered by time.
Some platforms provide predicted states directly, and you may choose to add your own predictor.
Implementations§
Source§impl PointerUpdate
impl PointerUpdate
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 PointerUpdate
impl Clone for PointerUpdate
Source§fn clone(&self) -> PointerUpdate
fn clone(&self) -> PointerUpdate
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 PointerUpdate
impl Debug for PointerUpdate
Source§impl PartialEq for PointerUpdate
impl PartialEq for PointerUpdate
impl StructuralPartialEq for PointerUpdate
Auto Trait Implementations§
impl Freeze for PointerUpdate
impl RefUnwindSafe for PointerUpdate
impl Send for PointerUpdate
impl Sync for PointerUpdate
impl Unpin for PointerUpdate
impl UnwindSafe for PointerUpdate
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