pub struct ActionEdge<A: Action> { /* private fields */ }Expand description
One logical action edge and its causal transition token.
An edge belongs to one physical occurrence. Different keys or mouse buttons mapped to the same action remain separate entries in physical event order. Pointer leave synthesizes releases in Left/Right/Middle order. Focus loss releases keys in portable catalog order, then mouse buttons in that order.
Implementations§
Source§impl<A: Action> ActionEdge<A>
impl<A: Action> ActionEdge<A>
Sourcepub const fn control(self) -> InputControl
pub const fn control(self) -> InputControl
Returns the physical control associated with this occurrence, even if several controls share its action or its pointer position is unknown. The original value is preserved across frame and delayed fixed delivery.
Sourcepub const fn cancellation_reason(self) -> Option<InputCancellationReason>
pub const fn cancellation_reason(self) -> Option<InputCancellationReason>
Returns why this release was synthesized, or None for ordinary input. Presses always return None. A mouse release without a known pointer is not necessarily cancelled; use this method rather than guessing from pointer absence. Cancellation does not erase an earlier press occurrence.
Sourcepub const fn is_cancelled(self) -> bool
pub const fn is_cancelled(self) -> bool
Returns whether this is a cancellation release rather than an ordinary physical release. Commit-on-release interactions should normally ignore cancelled releases while still clearing their own held/drag state.
Sourcepub const fn pointer(self) -> Option<PointerSample>
pub const fn pointer(self) -> Option<PointerSample>
Returns this mouse occurrence’s event-time pointer sample. Keyboard edges, cancellation releases, and mouse edges without a known position return None. Later movement does not change this value.
Sourcepub const fn state(self) -> ButtonState
pub const fn state(self) -> ButtonState
Returns whether this occurrence pressed or released its physical control.
Sourcepub const fn intent(self) -> TransitionIntentToken
pub const fn intent(self) -> TransitionIntentToken
Returns the runtime-issued token shared by frame and fixed delivery.
The token is valid only while the underlying occurrence remains live in one of those delivery queues.
Trait Implementations§
impl<A: Copy + Action> Copy for ActionEdge<A>
impl<A: Eq + Action> Eq for ActionEdge<A>
impl<A: PartialEq + Action> StructuralPartialEq for ActionEdge<A>
Auto Trait Implementations§
impl<A> Freeze for ActionEdge<A>where
A: Freeze,
impl<A> RefUnwindSafe for ActionEdge<A>where
A: RefUnwindSafe,
impl<A> Send for ActionEdge<A>
impl<A> Sync for ActionEdge<A>
impl<A> Unpin for ActionEdge<A>where
A: Unpin,
impl<A> UnsafeUnpin for ActionEdge<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for ActionEdge<A>where
A: UnwindSafe,
Blanket Implementations§
impl<T> Action for T
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.