pub struct App {Show 34 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: VecDeque<String>,
pub history_index: Option<usize>,
pub selected_match: usize,
pub selected_capture: Option<usize>,
pub clipboard_status: Option<String>,
pub show_whitespace: bool,
pub rounded_borders: bool,
pub vim_mode: bool,
pub vim_state: VimState,
pub compile_time: Option<Duration>,
pub match_time: Option<Duration>,
pub error_offset: Option<usize>,
pub output_on_quit: bool,
pub workspace_path: Option<String>,
pub show_recipes: bool,
pub recipe_index: usize,
pub show_benchmark: bool,
pub benchmark_results: Vec<BenchmarkResult>,
/* 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: VecDeque<String>§history_index: Option<usize>§selected_match: usize§selected_capture: Option<usize>§clipboard_status: Option<String>§show_whitespace: bool§rounded_borders: bool§vim_mode: bool§vim_state: VimState§compile_time: Option<Duration>§match_time: Option<Duration>§error_offset: Option<usize>§output_on_quit: bool§workspace_path: Option<String>§show_recipes: bool§recipe_index: usize§show_benchmark: bool§benchmark_results: Vec<BenchmarkResult>Implementations§
Source§impl App
impl App
pub const PANEL_REGEX: u8 = 0
pub const PANEL_TEST: u8 = 1
pub const PANEL_REPLACE: u8 = 2
pub const PANEL_MATCHES: u8 = 3
pub const PANEL_EXPLAIN: u8 = 4
pub const PANEL_COUNT: u8 = 5
Source§impl App
impl App
pub fn new(engine_kind: EngineKind, flags: EngineFlags) -> Self
pub fn set_replacement(&mut self, text: &str)
pub fn scroll_replace_up(&mut self)
pub fn scroll_replace_down(&mut self)
pub fn rereplace(&mut self)
pub fn set_pattern(&mut self, pattern: &str)
pub fn set_test_string(&mut self, text: &str)
pub fn switch_engine(&mut self)
pub fn switch_engine_to(&mut self, kind: EngineKind)
pub fn scroll_match_up(&mut self)
pub fn scroll_match_down(&mut self)
pub fn scroll_explain_up(&mut self)
pub fn scroll_explain_down(&mut self)
pub fn recompute(&mut self)
pub fn rematch(&mut self)
pub fn commit_pattern_to_history(&mut self)
pub fn history_prev(&mut self)
pub fn history_next(&mut self)
pub fn select_match_next(&mut self)
pub fn select_match_prev(&mut self)
pub fn copy_selected_match(&mut self)
pub fn set_status_message(&mut self, message: String)
Sourcepub fn tick_clipboard_status(&mut self) -> bool
pub fn tick_clipboard_status(&mut self) -> bool
Tick down the clipboard status timer. Returns true if status was cleared.
Sourcepub fn print_output(&self, group: Option<&str>, count: bool, color: bool)
pub fn print_output(&self, group: Option<&str>, count: bool, color: bool)
Print match results or replacement output to stdout.
Sourcepub fn print_json_output(&self)
pub fn print_json_output(&self)
Print matches as structured JSON.
Sourcepub fn edit_focused(&mut self, f: impl FnOnce(&mut Editor))
pub fn edit_focused(&mut self, f: impl FnOnce(&mut Editor))
Apply a mutating editor operation to the currently focused editor panel, then trigger the appropriate recompute/rematch/rereplace.
Sourcepub fn move_focused(&mut self, f: impl FnOnce(&mut Editor))
pub fn move_focused(&mut self, f: impl FnOnce(&mut Editor))
Apply a non-mutating cursor movement to the currently focused editor panel.
pub fn run_benchmark(&mut self)
Sourcepub fn regex101_url(&self) -> String
pub fn regex101_url(&self) -> String
Generate a regex101.com URL from the current state.
Sourcepub fn copy_regex101_url(&mut self)
pub fn copy_regex101_url(&mut self)
Copy regex101 URL to clipboard.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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