pub struct Search { /* private fields */ }
Expand description
Search handler for the todofile
Implementations§
Source§impl Search
impl Search
Sourcepub fn previous(&mut self, rebase_todo: &TodoFile, term: &str)
pub fn previous(&mut self, rebase_todo: &TodoFile, term: &str)
Select the previous search result
Sourcepub fn set_search_start_hint(&mut self, hint: usize)
pub fn set_search_start_hint(&mut self, hint: usize)
Set a hint for which result to select first during search
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Invalidate current search results
Sourcepub fn current_match(&self) -> Option<usize>
pub fn current_match(&self) -> Option<usize>
Get the index of the current selected result, if there is one
Sourcepub const fn current_result_selected(&self) -> Option<usize>
pub const fn current_result_selected(&self) -> Option<usize>
Get the selected result number, if there is one
Sourcepub fn total_results(&self) -> usize
pub fn total_results(&self) -> usize
Get the total number of results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Search
impl RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl UnwindSafe for Search
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