pub struct Detector<'a, T: Widget> {
pub widget: Box<T>,
pub on_tap: fn(widget: &'a mut T),
}Expand description
Controller wrapping a widget to detect when it is tapped.
Fields§
§widget: Box<T>Widget where the tap detection will be done.
on_tap: fn(widget: &'a mut T)Function called when the widget is tapped.
Implementations§
Trait Implementations§
Source§impl<'a, T: Widget> DebugWidget for Detector<'a, T>
impl<'a, T: Widget> DebugWidget for Detector<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Detector<'a, T>
impl<'a, T> RefUnwindSafe for Detector<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Detector<'a, T>where
T: Send,
impl<'a, T> Sync for Detector<'a, T>where
T: Sync,
impl<'a, T> Unpin for Detector<'a, T>
impl<'a, T> UnwindSafe for Detector<'a, 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
Mutably borrows from an owned value. Read more