pub struct KeyStatus { /* private fields */ }Implementations§
Source§impl KeyStatus
impl KeyStatus
pub fn new() -> Self
pub fn update(&mut self, pressed: bool, delta: Duration)
pub fn is_pressed(&self) -> bool
pub fn is_released(&self) -> bool
pub fn since_pressed(&self) -> Duration
pub fn since_released(&self) -> Duration
pub fn last_state_duration(&self) -> Duration
pub fn press_event(&self) -> bool
pub fn release_event(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyStatus
impl RefUnwindSafe for KeyStatus
impl Send for KeyStatus
impl Sync for KeyStatus
impl Unpin for KeyStatus
impl UnwindSafe for KeyStatus
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