pub struct HintState {
hint: Option<Hint>,
alphabet: String,
matches: Vec<Match>,
labels: Vec<Vec<char>>,
keys: Vec<char>,
}
Expand description
Keyboard regex hint state.
Fields§
§hint: Option<Hint>
Hint currently in use.
alphabet: String
Alphabet for hint labels.
matches: Vec<Match>
Visible matches.
labels: Vec<Vec<char>>
Key label for each visible match.
keys: Vec<char>
Keys pressed for hint selection.
Implementations§
source§impl HintState
impl HintState
sourcepub fn update_matches<T>(&mut self, term: &Term<T>)
pub fn update_matches<T>(&mut self, term: &Term<T>)
Update the visible hint matches and key labels.
sourcepub fn keyboard_input<T>(
&mut self,
term: &Term<T>,
c: char
) -> Option<HintMatch>
pub fn keyboard_input<T>( &mut self, term: &Term<T>, c: char ) -> Option<HintMatch>
Handle keyboard input during hint selection.
sourcepub fn update_alphabet(&mut self, alphabet: &str)
pub fn update_alphabet(&mut self, alphabet: &str)
Update the alphabet used for hint labels.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HintState
impl !Send for HintState
impl !Sync for HintState
impl Unpin for HintState
impl !UnwindSafe for HintState
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