pub enum ButtonEvent {
Pressed,
Released,
Press,
Release,
SetLabel(String),
SetKey(Code),
}Expand description
Events sent when interacting with a button and events to set properties of a button
Variants§
Pressed
Emitted by a button when the button is pressed
Released
Emitted by a button when the button is released
Press
Received by the button and triggers the on_press event to be emitted
Release
Received by the button and triggers the on_release event to be emitted
SetLabel(String)
Sets the label of the button
SetKey(Code)
Sets the keycode for triggering the button with the keyboard
Trait Implementations§
Source§impl Clone for ButtonEvent
impl Clone for ButtonEvent
Source§fn clone(&self) -> ButtonEvent
fn clone(&self) -> ButtonEvent
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 ButtonEvent
impl Debug for ButtonEvent
Source§impl PartialEq for ButtonEvent
impl PartialEq for ButtonEvent
impl StructuralPartialEq for ButtonEvent
Auto Trait Implementations§
impl Freeze for ButtonEvent
impl RefUnwindSafe for ButtonEvent
impl Send for ButtonEvent
impl Sync for ButtonEvent
impl Unpin for ButtonEvent
impl UnwindSafe for ButtonEvent
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