pub enum Interaction {
Press(PressId, Vec2),
Release(PressId),
Cancel(PressId),
HoverEnter,
HoverLeave,
Focus,
Unfocus,
DragStart,
DragStop,
DragCancel,
}Expand description
An interaction event that can be emitted by a MutableInteractionSource.
Compose-like per-interaction-type hierarchy:
PressInteraction.Press(position)/Release(press)/Cancel(press)HoverInteraction.Enter/ExitFocusInteraction.Focus/UnfocusDragInteraction.Start/Stop/Cancel
Variants§
Press(PressId, Vec2)
A press started at the given position (in local coords).
Carries a unique PressId so Release/Cancel can identify which press to end.
Release(PressId)
The press with the given PressId was released.
Cancel(PressId)
The press with the given PressId was cancelled
(e.g. gesture disambiguation, pointer leave during press).
HoverEnter
HoverLeave
Focus
Unfocus
DragStart
DragStop
DragCancel
Implementations§
Trait Implementations§
Source§impl Clone for Interaction
impl Clone for Interaction
Source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
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 Interaction
Source§impl Debug for Interaction
impl Debug for Interaction
Source§impl PartialEq for Interaction
impl PartialEq for Interaction
Source§fn eq(&self, other: &Interaction) -> bool
fn eq(&self, other: &Interaction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Interaction
Auto Trait Implementations§
impl Freeze for Interaction
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnsafeUnpin for Interaction
impl UnwindSafe for Interaction
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