Skip to main content

OnMouseFn

Type Alias OnMouseFn 

Source
pub type OnMouseFn = Arc<dyn Fn(MouseMsg) -> Cmd + Send + Sync>;
Expand description

OnMouseFn closure type for View mouse handlers.

Arc (rather than Box) so that View clones preserve the handler: the renderer clones the view each frame and needs the closure on last_view to route mouse messages back to the model.

Aliased Typeยง

pub struct OnMouseFn { /* private fields */ }