pub struct KeypadButton {
pub label: char,
pub pressed: bool,
pub action: ButtonAction,
}Expand description
A single keypad button
Fields§
§label: charThe character/symbol on the button
pressed: boolWhether the button is currently pressed/highlighted
action: ButtonActionThe action this button performs
Implementations§
Source§impl KeypadButton
impl KeypadButton
Sourcepub fn open_paren() -> Self
pub fn open_paren() -> Self
Creates the open parenthesis button
Sourcepub fn close_paren() -> Self
pub fn close_paren() -> Self
Creates the close parenthesis button
Sourcepub fn set_pressed(&mut self, pressed: bool)
pub fn set_pressed(&mut self, pressed: bool)
Sets the pressed state
Trait Implementations§
Source§impl Clone for KeypadButton
impl Clone for KeypadButton
Source§fn clone(&self) -> KeypadButton
fn clone(&self) -> KeypadButton
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 KeypadButton
impl Debug for KeypadButton
Source§impl PartialEq for KeypadButton
impl PartialEq for KeypadButton
impl Eq for KeypadButton
impl StructuralPartialEq for KeypadButton
Auto Trait Implementations§
impl Freeze for KeypadButton
impl RefUnwindSafe for KeypadButton
impl Send for KeypadButton
impl Sync for KeypadButton
impl Unpin for KeypadButton
impl UnsafeUnpin for KeypadButton
impl UnwindSafe for KeypadButton
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