pub struct InputState { /* private fields */ }Expand description
Input state management
Implementations§
Source§impl InputState
impl InputState
Sourcepub fn pending_key(&self) -> Option<char>
pub fn pending_key(&self) -> Option<char>
Get the pending key
Sourcepub fn pending_key_time(&self) -> Option<Instant>
pub fn pending_key_time(&self) -> Option<Instant>
Get the pending key timestamp
Sourcepub fn enter_search(&mut self)
pub fn enter_search(&mut self)
Enter search mode
Sourcepub fn exit_search(&mut self)
pub fn exit_search(&mut self)
Exit search mode and return to normal mode
Sourcepub fn is_searching(&self) -> bool
pub fn is_searching(&self) -> bool
Check if currently in search mode
Sourcepub fn set_pending_key(&mut self, key: char)
pub fn set_pending_key(&mut self, key: char)
Set pending key with timestamp
Sourcepub fn clear_pending_key(&mut self)
pub fn clear_pending_key(&mut self)
Clear pending key state
Sourcepub fn is_pending_key_expired(&self) -> bool
pub fn is_pending_key_expired(&self) -> bool
Check if pending key has timed out (2 seconds)
Trait Implementations§
Source§impl Clone for InputState
impl Clone for InputState
Source§fn clone(&self) -> InputState
fn clone(&self) -> InputState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InputState
impl Debug for InputState
Auto Trait Implementations§
impl Freeze for InputState
impl RefUnwindSafe for InputState
impl Send for InputState
impl Sync for InputState
impl Unpin for InputState
impl UnsafeUnpin for InputState
impl UnwindSafe for InputState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more