pub struct Find { /* private fields */ }
Expand description
Contains logic to search text
Implementations§
Source§impl Find
impl Find
pub fn new(id: usize) -> Find
pub fn id(&self) -> usize
pub fn occurrences(&self) -> &Selection
pub fn hls_dirty(&self) -> bool
pub fn find_status( &self, view: &View, text: &Rope, matches_only: bool, ) -> FindStatus
pub fn set_hls_dirty(&mut self, is_dirty: bool)
pub fn update_highlights(&mut self, text: &Rope, delta: &RopeDelta)
Sourcepub fn update_find(
&mut self,
text: &Rope,
start: usize,
end: usize,
include_slop: bool,
)
pub fn update_find( &mut self, text: &Rope, start: usize, end: usize, include_slop: bool, )
Execute the search on the provided text in the range provided by start
and end
.
Sourcepub fn next_occurrence(
&self,
text: &Rope,
reverse: bool,
wrapped: bool,
sel: &Selection,
) -> Option<SelRegion>
pub fn next_occurrence( &self, text: &Rope, reverse: bool, wrapped: bool, sel: &Selection, ) -> Option<SelRegion>
Return the occurrence closest to the provided selection sel
. If searched is reversed then
the occurrence closest to the start of the selection is returned. wrapped
indicates that
if the end of the text is reached the search continues from the start.
Trait Implementations§
Source§impl ToAnnotation for Find
Implementing the ToAnnotation
trait allows to convert finds to annotations.
impl ToAnnotation for Find
Implementing the ToAnnotation
trait allows to convert finds to annotations.
Source§fn get_annotations(
&self,
interval: Interval,
view: &View,
text: &Rope,
) -> AnnotationSlice
fn get_annotations( &self, interval: Interval, view: &View, text: &Rope, ) -> AnnotationSlice
Returns annotations that overlap the provided interval.
Auto Trait Implementations§
impl Freeze for Find
impl RefUnwindSafe for Find
impl Send for Find
impl Sync for Find
impl Unpin for Find
impl UnwindSafe for Find
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