Trait term_model::term::Search

source ·
pub trait Search {
    // Required methods
    fn semantic_search_left(&self, _: Point<usize>) -> Point<usize>;
    fn semantic_search_right(&self, _: Point<usize>) -> Point<usize>;
    fn line_search_left(&self, _: Point<usize>) -> Point<usize>;
    fn line_search_right(&self, _: Point<usize>) -> Point<usize>;
    fn bracket_search(&self, _: Point<usize>) -> Option<Point<usize>>;
}
Expand description

A type that can expand a given point to a region

Usually this is implemented for some 2-D array type since points are two dimensional indices.

Required Methods§

source

fn semantic_search_left(&self, _: Point<usize>) -> Point<usize>

Find the nearest semantic boundary to the left of provided point.

source

fn semantic_search_right(&self, _: Point<usize>) -> Point<usize>

Find the nearest semantic boundary to the point of provided point.

source

fn line_search_left(&self, _: Point<usize>) -> Point<usize>

Find the beginning of a line, following line wraps.

source

fn line_search_right(&self, _: Point<usize>) -> Point<usize>

Find the end of a line, following line wraps.

Find the nearest matching bracket.

Implementors§

source§

impl<T> Search for Term<T>