pub struct SearchState { /* private fields */ }
Expand description
Search related state, part of the app state
Implementations§
Source§impl SearchState
impl SearchState
pub fn is_up_to_date(&self) -> bool
pub fn selected_found(&self) -> usize
pub fn has_founds(&self) -> bool
pub fn must_be_drawn(&self) -> bool
pub fn focus_with_mode(&mut self, mode: SearchMode)
pub fn unfocus(&mut self)
pub fn focused(&self) -> bool
pub fn input_has_content(&self) -> bool
pub fn unfocus_and_clear(&mut self)
pub fn clear(&mut self)
pub fn next_match(&mut self)
pub fn previous_match(&mut self)
Sourcepub fn apply_key_combination(&mut self, key: KeyCombination) -> bool
pub fn apply_key_combination(&mut self, key: KeyCombination) -> bool
handle a raw, uninterpreted key combination (in an input if there’s one focused), return true if the key was consumed (if not, keybindings will be computed)
pub fn search(&self) -> Search
pub fn is_invalid(&self) -> bool
pub fn set_founds(&mut self, founds: Vec<Found>)
pub fn extend_founds(&mut self, new_founds: Vec<Found>)
Sourcepub fn selected_found_line(&self) -> Option<usize>
pub fn selected_found_line(&self) -> Option<usize>
if there are search results, return the line index of the currently selected one
pub fn founds(&self) -> &[Found]
Sourcepub fn draw_prefixed_input(
&mut self,
w: &mut W,
x: u16,
y: u16,
prefix_style: &str,
width: u16,
) -> Result<()>
pub fn draw_prefixed_input( &mut self, w: &mut W, x: u16, y: u16, prefix_style: &str, width: u16, ) -> Result<()>
Draw the input with its ‘/’, at the given position, with the specified width
pub fn add_summary_tstring(&self, t_line: &mut TLine, style: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SearchState
impl RefUnwindSafe for SearchState
impl Send for SearchState
impl Sync for SearchState
impl Unpin for SearchState
impl UnwindSafe for SearchState
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