Skip to main content

CursorSearch

Trait CursorSearch 

Source
pub trait CursorSearch<Cursor> {
    // Required methods
    fn find_char(
        &self,
        cursor: &Cursor,
        inclusive: bool,
        dir: MoveDir1D,
        multiline: bool,
        needle: char,
        count: usize,
    ) -> Option<Cursor>;
    fn find_matches(
        &self,
        start: &Cursor,
        end: &Cursor,
        needle: &Regex,
    ) -> Vec<EditRange<Cursor>>;
    fn find_regex(
        &self,
        cursor: &Cursor,
        dir: MoveDir1D,
        needle: &Regex,
        count: usize,
    ) -> Option<EditRange<Cursor>>;
}
Expand description

Trait for objects capable of searching text.

Required Methods§

Source

fn find_char( &self, cursor: &Cursor, inclusive: bool, dir: MoveDir1D, multiline: bool, needle: char, count: usize, ) -> Option<Cursor>

Search for a specific character.

Source

fn find_matches( &self, start: &Cursor, end: &Cursor, needle: &Regex, ) -> Vec<EditRange<Cursor>>

Find matches for a regular expression within a range.

Source

fn find_regex( &self, cursor: &Cursor, dir: MoveDir1D, needle: &Regex, count: usize, ) -> Option<EditRange<Cursor>>

Search for a regular expression.

Implementors§