pub struct UseLongPressOptions {
pub onstart: Option<Box<dyn FnMut(MouseEvent)>>,
pub onend: Option<Box<dyn FnMut(MouseEvent)>>,
pub onlongpress: Option<Box<dyn FnMut(MouseEvent)>>,
pub threshold: Option<u32>,
pub move_threshold: Option<f64>,
pub prevent_default: Option<bool>,
}Expand description
Options for long press.
Fields§
§onstart: Option<Box<dyn FnMut(MouseEvent)>>Callback for when long press starts.
onend: Option<Box<dyn FnMut(MouseEvent)>>Callback for when long press ends.
onlongpress: Option<Box<dyn FnMut(MouseEvent)>>Callback for when long press is completed (after threshold).
threshold: Option<u32>Duration in milliseconds before long press is triggered.
move_threshold: Option<f64>Maximum movement in pixels allowed during press. If exceeded, long press won’t trigger.
prevent_default: Option<bool>Whether to prevent default behavior on mouse/touch events.
Trait Implementations§
Source§impl Default for UseLongPressOptions
impl Default for UseLongPressOptions
Source§fn default() -> UseLongPressOptions
fn default() -> UseLongPressOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UseLongPressOptions
impl !RefUnwindSafe for UseLongPressOptions
impl !Send for UseLongPressOptions
impl !Sync for UseLongPressOptions
impl Unpin for UseLongPressOptions
impl UnsafeUnpin for UseLongPressOptions
impl !UnwindSafe for UseLongPressOptions
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.