[][src]Struct alacritty::event::SearchState

pub struct SearchState {
    direction: Direction,
    display_offset_delta: isize,
    origin: Point,
    focused_match: Option<RangeInclusive<Point<usize>>>,
    history: VecDeque<String>,
    history_index: Option<usize>,
}

Regex search state.

Fields

direction: Direction

Search direction.

display_offset_delta: isize

Change in display offset since the beginning of the search.

origin: Point

Search origin in viewport coordinates relative to original display offset.

focused_match: Option<RangeInclusive<Point<usize>>>

Focused match during active search.

history: VecDeque<String>

Search regex and history.

When a search is currently active, the first element will be what the user can modify in the current search session. While going through history, the [history_index] will point to the element in history which is currently being previewed.

history_index: Option<usize>

Current position in the search history.

Implementations

impl SearchState[src]

fn new() -> Self[src]

pub fn regex(&self) -> Option<&String>[src]

Search regex text if a search is active.

pub fn direction(&self) -> Direction[src]

Direction of the search from the search origin.

pub fn focused_match(&self) -> Option<&RangeInclusive<Point<usize>>>[src]

Focused match during vi-less search.

fn regex_mut(&mut self) -> Option<&mut String>[src]

Search regex text if a search is active.

Trait Implementations

impl Default for SearchState[src]

Auto Trait Implementations

impl RefUnwindSafe for SearchState

impl Send for SearchState

impl Sync for SearchState

impl Unpin for SearchState

impl UnwindSafe for SearchState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.