Skip to main content

App

Struct App 

Source
pub struct App {
Show 22 fields pub regex_editor: Editor, pub test_editor: Editor, pub replace_editor: Editor, pub focused_panel: u8, pub engine_kind: EngineKind, pub flags: EngineFlags, pub matches: Vec<Match>, pub replace_result: Option<ReplaceResult>, pub explanation: Vec<ExplainNode>, pub error: Option<String>, pub show_help: bool, pub help_page: usize, pub should_quit: bool, pub match_scroll: u16, pub replace_scroll: u16, pub explain_scroll: u16, pub pattern_history: Vec<String>, pub history_index: Option<usize>, pub selected_match: usize, pub selected_capture: Option<usize>, pub clipboard_status: Option<String>, pub show_whitespace: bool, /* private fields */
}

Fields§

§regex_editor: Editor§test_editor: Editor§replace_editor: Editor§focused_panel: u8§engine_kind: EngineKind§flags: EngineFlags§matches: Vec<Match>§replace_result: Option<ReplaceResult>§explanation: Vec<ExplainNode>§error: Option<String>§show_help: bool§help_page: usize§should_quit: bool§match_scroll: u16§replace_scroll: u16§explain_scroll: u16§pattern_history: Vec<String>§history_index: Option<usize>§selected_match: usize§selected_capture: Option<usize>§clipboard_status: Option<String>§show_whitespace: bool

Implementations§

Source§

impl App

Source

pub fn new(engine_kind: EngineKind, flags: EngineFlags) -> Self

Source

pub fn set_replacement(&mut self, text: &str)

Source

pub fn scroll_replace_up(&mut self)

Source

pub fn scroll_replace_down(&mut self)

Source

pub fn rereplace(&mut self)

Source

pub fn set_pattern(&mut self, pattern: &str)

Source

pub fn set_test_string(&mut self, text: &str)

Source

pub fn switch_engine(&mut self)

Source

pub fn scroll_match_up(&mut self)

Source

pub fn scroll_match_down(&mut self)

Source

pub fn scroll_explain_up(&mut self)

Source

pub fn scroll_explain_down(&mut self)

Source

pub fn recompute(&mut self)

Source

pub fn rematch(&mut self)

Source

pub fn commit_pattern_to_history(&mut self)

Source

pub fn history_prev(&mut self)

Source

pub fn history_next(&mut self)

Source

pub fn select_match_next(&mut self)

Source

pub fn select_match_prev(&mut self)

Source

pub fn copy_selected_match(&mut self)

Source

pub fn tick_clipboard_status(&mut self) -> bool

Tick down the clipboard status timer. Returns true if status was cleared.

Auto Trait Implementations§

§

impl Freeze for App

§

impl !RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

§

impl !UnwindSafe for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.