Trait modalkit::prelude::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§