pub struct Search {
pub open: bool,
/* private fields */
}Fields§
§open: boolThe prompt is capturing input; once committed it stays false while
highlights persist and n/N navigate.
Implementations§
Source§impl Search
impl Search
pub fn start(origin_row: usize) -> Self
pub fn query(&self) -> &str
pub fn origin_row(&self) -> usize
Sourcepub fn count(&self) -> (usize, usize)
pub fn count(&self) -> (usize, usize)
(1-based active, total); (0, 0) when there are no matches.
pub fn insert(&mut self, c: char)
pub fn backspace(&mut self)
Sourcepub fn recompute(&mut self, rows: &[(usize, String)])
pub fn recompute(&mut self, rows: &[(usize, String)])
Recompute matches against rows, picking the active match as the first
at or after origin_row. Re-run whenever the rows change so highlights
track the live content.
pub fn commit(&mut self) -> Option<usize>
pub fn next_match(&mut self) -> Option<usize>
pub fn prev_match(&mut self) -> Option<usize>
pub fn current_row(&self) -> Option<usize>
Sourcepub fn match_rows(&self) -> Vec<usize>
pub fn match_rows(&self) -> Vec<usize>
The distinct rows holding at least one match, in row order.
pub fn ranges_for(&self, row: usize) -> Vec<(Range<usize>, bool)>
Auto Trait Implementations§
impl Freeze for Search
impl RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl UnsafeUnpin 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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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