pub trait ButtonEvent: Sized {
// Required methods
fn from_button_args(args: ButtonArgs, old_event: &Self) -> Option<Self>;
fn button<U, F>(&self, f: F) -> Option<U>
where F: FnMut(ButtonArgs) -> U;
// Provided method
fn button_args(&self) -> Option<ButtonArgs> { ... }
}
Expand description
Changed button state.
Required Methods§
Creates a button event.
Preserves time stamp from original input event, if any.
Calls closure if this is a button event.
Provided Methods§
Returns button arguments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.