pub struct DragOptions {
pub button: MouseButton,
pub total_duration: Duration,
pub steps: usize,
pub jitter_px: f64,
pub hold_before_move: Option<Duration>,
pub settle_after_move: Option<Duration>,
pub move_cursor_to_start: bool,
pub easing: DragEasing,
}Expand description
Configuration controlling drag gestures.
Fields§
Mouse button to use; defaults to the left button.
total_duration: DurationTotal duration of the drag gesture.
steps: usizeNumber of intermediate steps; higher values produce smoother motion.
jitter_px: f64Maximum jitter, in pixels, applied to intermediate points.
hold_before_move: Option<Duration>Optional delay after pressing the button and before moving.
settle_after_move: Option<Duration>Optional delay after reaching the target and before releasing.
move_cursor_to_start: boolWhether the cursor should move to the start before pressing.
easing: DragEasingCurve used to distribute motion during the drag.
Trait Implementations§
Source§impl Clone for DragOptions
impl Clone for DragOptions
Source§fn clone(&self) -> DragOptions
fn clone(&self) -> DragOptions
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 DragOptions
impl Debug for DragOptions
Auto Trait Implementations§
impl Freeze for DragOptions
impl RefUnwindSafe for DragOptions
impl Send for DragOptions
impl Sync for DragOptions
impl Unpin for DragOptions
impl UnwindSafe for DragOptions
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