pub struct SearchState { /* private fields */ }Expand description
Search mode state.
Implementations§
Source§impl SearchState
impl SearchState
pub fn query(&self) -> Option<&str>
pub fn filtered_indices(&self) -> &[usize]
pub fn filtered_pattern_indices(&self) -> &[usize]
pub fn scope_indices(&self) -> Option<&HashSet<usize>>
pub fn set_query(&mut self, value: Option<String>)
pub fn clear_filtered_indices(&mut self)
pub fn clear_filtered_pattern_indices(&mut self)
Sourcepub fn push_query_char(&mut self, c: char)
pub fn push_query_char(&mut self, c: char)
Append a char to the query string. No-op when the query is inactive.
Sourcepub fn pop_query_char(&mut self)
pub fn pop_query_char(&mut self)
Pop the trailing char from the query string. No-op when the query is inactive.
Trait Implementations§
Source§impl Default for SearchState
impl Default for SearchState
Source§fn default() -> SearchState
fn default() -> SearchState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchState
impl RefUnwindSafe for SearchState
impl Send for SearchState
impl Sync for SearchState
impl Unpin for SearchState
impl UnsafeUnpin 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
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