pub struct InputHandler;Expand description
Input handler that maps key events to actions
Implementations§
Source§impl InputHandler
impl InputHandler
Sourcepub fn handle_key(&self, event: KeyEvent) -> KeyAction
pub fn handle_key(&self, event: KeyEvent) -> KeyAction
Maps a key event to an action
Sourcepub fn is_valid_char(c: char) -> bool
pub fn is_valid_char(c: char) -> bool
Returns true if the character is valid for calculator input
Trait Implementations§
Source§impl Debug for InputHandler
impl Debug for InputHandler
Source§impl Default for InputHandler
impl Default for InputHandler
Source§fn default() -> InputHandler
fn default() -> InputHandler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InputHandler
impl RefUnwindSafe for InputHandler
impl Send for InputHandler
impl Sync for InputHandler
impl Unpin for InputHandler
impl UnsafeUnpin for InputHandler
impl UnwindSafe for InputHandler
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