pub struct SearchState {
pub active: bool,
pub query: String,
pub direction: SearchDirection,
pub matches: Vec<SearchMatch>,
pub current_match: Option<usize>,
}Expand description
Search state for copy mode search functionality
Fields§
§active: boolWhether search is currently active
query: StringCurrent search query
direction: SearchDirectionSearch direction
matches: Vec<SearchMatch>List of all matches found
current_match: Option<usize>Index of the currently selected match
Implementations§
Source§impl SearchState
impl SearchState
Sourcepub fn start_search(&mut self, direction: SearchDirection)
pub fn start_search(&mut self, direction: SearchDirection)
Start a new search in the given direction
Sourcepub fn update_query(&mut self, query: String, matches: Vec<SearchMatch>)
pub fn update_query(&mut self, query: String, matches: Vec<SearchMatch>)
Update the search query and matches
Sourcepub fn next_match(&mut self)
pub fn next_match(&mut self)
Navigate to the next match
Sourcepub fn prev_match(&mut self)
pub fn prev_match(&mut self)
Navigate to the previous match
Sourcepub fn current(&self) -> Option<&SearchMatch>
pub fn current(&self) -> Option<&SearchMatch>
Get the currently selected match
Sourcepub fn deactivate(&mut self)
pub fn deactivate(&mut self)
Deactivate search
Trait Implementations§
Source§impl Clone for SearchState
impl Clone for SearchState
Source§fn clone(&self) -> SearchState
fn clone(&self) -> SearchState
Returns a duplicate of the value. Read more
1.0.0 · 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 SearchState
impl Debug for SearchState
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
Source§impl<'de> Deserialize<'de> for SearchState
impl<'de> Deserialize<'de> for SearchState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.