#[non_exhaustive]pub enum PointerButtonEvent<T> {
Pressed {
target: T,
pointer: PointerSample,
intent: TransitionIntentToken,
},
Clicked {
target: T,
pointer: PointerSample,
intent: TransitionIntentToken,
},
Cancelled {
target: T,
reason: PointerButtonCancellation,
intent: TransitionIntentToken,
},
}Expand description
One change emitted while interpreting an individual mouse action edge.
Targets are caller-owned identities. Samples and tokens come from this exact edge, not the frame’s latest pointer or the original press. Tokens retain their existing runtime lifetime; storing an event does not extend it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pressed
A known in-viewport press captured an eligible target.
Fields
target: TTarget chosen by the caller at the press position.
pointer: PointerSampleThe press’s immutable event-time pointer sample.
intent: TransitionIntentTokenThe press occurrence’s runtime-issued token.
Clicked
A normal release over that same eligible target confirmed a click.
Fields
target: TOriginal captured target, equal to the release’s eligible hit.
pointer: PointerSampleThe release’s immutable event-time pointer sample.
intent: TransitionIntentTokenThe release occurrence’s runtime-issued token.
Cancelled
A captured hold ended without confirmation.
Fields
target: TOriginal captured target; it must not receive a click.
reason: PointerButtonCancellationWhy confirmation was rejected.
intent: TransitionIntentTokenThe release or cancellation occurrence’s runtime-issued token.
Trait Implementations§
Source§impl<T: Clone> Clone for PointerButtonEvent<T>
impl<T: Clone> Clone for PointerButtonEvent<T>
impl<T: Copy> Copy for PointerButtonEvent<T>
Source§impl<T: Debug> Debug for PointerButtonEvent<T>
impl<T: Debug> Debug for PointerButtonEvent<T>
impl<T: Eq> Eq for PointerButtonEvent<T>
Source§impl<T: PartialEq> PartialEq for PointerButtonEvent<T>
impl<T: PartialEq> PartialEq for PointerButtonEvent<T>
impl<T: PartialEq> StructuralPartialEq for PointerButtonEvent<T>
Auto Trait Implementations§
impl<T> Freeze for PointerButtonEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for PointerButtonEvent<T>where
T: RefUnwindSafe,
impl<T> Send for PointerButtonEvent<T>where
T: Send,
impl<T> Sync for PointerButtonEvent<T>where
T: Sync,
impl<T> Unpin for PointerButtonEvent<T>where
T: Unpin,
impl<T> UnsafeUnpin for PointerButtonEvent<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PointerButtonEvent<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.