BufferAPI

Trait BufferAPI 

Source
pub trait BufferAPI: Send + Sync {
Show 115 methods // Required methods fn get_id(&self) -> usize; fn get_query(&self) -> String; fn set_query(&mut self, query: String); fn get_last_query(&self) -> String; fn set_last_query(&mut self, query: String); fn get_datatable(&self) -> Option<&DataTable>; fn get_datatable_mut(&mut self) -> Option<&mut DataTable>; fn has_datatable(&self) -> bool; fn set_datatable(&mut self, datatable: Option<Arc<DataTable>>); fn get_original_source(&self) -> Option<&DataTable>; fn set_results_as_datatable( &mut self, response: Option<QueryResponse>, ) -> Result<(), String>; fn get_dataview(&self) -> Option<&DataView>; fn get_dataview_mut(&mut self) -> Option<&mut DataView>; fn set_dataview(&mut self, dataview: Option<DataView>); fn has_dataview(&self) -> bool; fn get_mode(&self) -> AppMode; fn set_mode(&mut self, mode: AppMode); fn get_edit_mode(&self) -> EditMode; fn set_edit_mode(&mut self, mode: EditMode); fn get_status_message(&self) -> String; fn set_status_message(&mut self, message: String); fn get_selected_row(&self) -> Option<usize>; fn set_selected_row(&mut self, row: Option<usize>); fn get_current_column(&self) -> usize; fn set_current_column(&mut self, col: usize); fn get_scroll_offset(&self) -> (usize, usize); fn set_scroll_offset(&mut self, offset: (usize, usize)); fn get_last_results_row(&self) -> Option<usize>; fn set_last_results_row(&mut self, row: Option<usize>); fn get_last_scroll_offset(&self) -> (usize, usize); fn set_last_scroll_offset(&mut self, offset: (usize, usize)); fn get_filter_pattern(&self) -> String; fn set_filter_pattern(&mut self, pattern: String); fn is_filter_active(&self) -> bool; fn set_filter_active(&mut self, active: bool); fn get_fuzzy_filter_pattern(&self) -> String; fn set_fuzzy_filter_pattern(&mut self, pattern: String); fn is_fuzzy_filter_active(&self) -> bool; fn set_fuzzy_filter_active(&mut self, active: bool); fn get_fuzzy_filter_indices(&self) -> &Vec<usize>; fn set_fuzzy_filter_indices(&mut self, indices: Vec<usize>); fn clear_fuzzy_filter(&mut self); fn get_search_pattern(&self) -> String; fn set_search_pattern(&mut self, pattern: String); fn get_search_matches(&self) -> Vec<(usize, usize)>; fn set_search_matches(&mut self, matches: Vec<(usize, usize)>); fn get_current_match(&self) -> Option<(usize, usize)>; fn set_current_match(&mut self, match_pos: Option<(usize, usize)>); fn get_search_match_index(&self) -> usize; fn set_search_match_index(&mut self, index: usize); fn clear_search_state(&mut self); fn get_column_stats(&self) -> Option<&ColumnStatistics>; fn set_column_stats(&mut self, stats: Option<ColumnStatistics>); fn get_sort_column(&self) -> Option<usize>; fn set_sort_column(&mut self, column: Option<usize>); fn get_sort_order(&self) -> SortOrder; fn set_sort_order(&mut self, order: SortOrder); fn is_compact_mode(&self) -> bool; fn set_compact_mode(&mut self, compact: bool); fn is_show_row_numbers(&self) -> bool; fn set_show_row_numbers(&mut self, show: bool); fn is_viewport_lock(&self) -> bool; fn set_viewport_lock(&mut self, locked: bool); fn get_viewport_lock_row(&self) -> Option<usize>; fn set_viewport_lock_row(&mut self, row: Option<usize>); fn get_column_widths(&self) -> &Vec<u16>; fn set_column_widths(&mut self, widths: Vec<u16>); fn is_case_insensitive(&self) -> bool; fn set_case_insensitive(&mut self, case_insensitive: bool); fn get_name(&self) -> String; fn set_name(&mut self, name: String); fn get_file_path(&self) -> Option<&PathBuf>; fn set_file_path(&mut self, path: Option<String>); fn is_modified(&self) -> bool; fn set_modified(&mut self, modified: bool); fn get_last_query_source(&self) -> Option<String>; fn set_last_query_source(&mut self, source: Option<String>); fn get_input_value(&self) -> String; fn set_input_value(&mut self, value: String); fn get_input_cursor(&self) -> usize; fn set_input_cursor(&mut self, pos: usize); fn apply_filter(&mut self) -> Result<()>; fn apply_sort(&mut self) -> Result<()>; fn search(&mut self) -> Result<()>; fn clear_filters(&mut self); fn get_row_count(&self) -> usize; fn get_column_count(&self) -> usize; fn get_column_names(&self) -> Vec<String>; fn get_undo_stack(&self) -> &Vec<(String, usize)>; fn push_undo(&mut self, state: (String, usize)); fn pop_undo(&mut self) -> Option<(String, usize)>; fn get_redo_stack(&self) -> &Vec<(String, usize)>; fn push_redo(&mut self, state: (String, usize)); fn pop_redo(&mut self) -> Option<(String, usize)>; fn clear_redo(&mut self); fn get_kill_ring(&self) -> String; fn set_kill_ring(&mut self, text: String); fn is_kill_ring_empty(&self) -> bool; fn perform_undo(&mut self) -> bool; fn perform_redo(&mut self) -> bool; fn save_state_for_undo(&mut self); fn get_last_visible_rows(&self) -> usize; fn set_last_visible_rows(&mut self, rows: usize); fn debug_dump(&self) -> String; fn get_input_text(&self) -> String; fn set_input_text(&mut self, text: String); fn handle_input_key(&mut self, event: KeyEvent) -> bool; fn switch_input_mode(&mut self, multiline: bool); fn get_input_cursor_position(&self) -> usize; fn set_input_cursor_position(&mut self, position: usize); fn is_input_multiline(&self) -> bool; fn navigate_history_up(&mut self, history: &[String]) -> bool; fn navigate_history_down(&mut self, history: &[String]) -> bool; fn reset_history_navigation(&mut self); fn clear_results(&mut self);
}
Expand description

BufferAPI trait - defines the interface for interacting with buffer state This abstraction allows the TUI to work with buffer state without knowing the implementation details, enabling gradual migration and testing

Required Methods§

Source

fn get_id(&self) -> usize

Source

fn get_query(&self) -> String

Source

fn set_query(&mut self, query: String)

Source

fn get_last_query(&self) -> String

Source

fn set_last_query(&mut self, query: String)

Source

fn get_datatable(&self) -> Option<&DataTable>

Source

fn get_datatable_mut(&mut self) -> Option<&mut DataTable>

Source

fn has_datatable(&self) -> bool

Source

fn set_datatable(&mut self, datatable: Option<Arc<DataTable>>)

Source

fn get_original_source(&self) -> Option<&DataTable>

Source

fn set_results_as_datatable( &mut self, response: Option<QueryResponse>, ) -> Result<(), String>

V50: Helper to convert QueryResponse to DataTable and store it

Source

fn get_dataview(&self) -> Option<&DataView>

Source

fn get_dataview_mut(&mut self) -> Option<&mut DataView>

Source

fn set_dataview(&mut self, dataview: Option<DataView>)

Source

fn has_dataview(&self) -> bool

Source

fn get_mode(&self) -> AppMode

Source

fn set_mode(&mut self, mode: AppMode)

Source

fn get_edit_mode(&self) -> EditMode

Source

fn set_edit_mode(&mut self, mode: EditMode)

Source

fn get_status_message(&self) -> String

Source

fn set_status_message(&mut self, message: String)

Source

fn get_selected_row(&self) -> Option<usize>

Source

fn set_selected_row(&mut self, row: Option<usize>)

Source

fn get_current_column(&self) -> usize

Source

fn set_current_column(&mut self, col: usize)

Source

fn get_scroll_offset(&self) -> (usize, usize)

Source

fn set_scroll_offset(&mut self, offset: (usize, usize))

Source

fn get_last_results_row(&self) -> Option<usize>

Source

fn set_last_results_row(&mut self, row: Option<usize>)

Source

fn get_last_scroll_offset(&self) -> (usize, usize)

Source

fn set_last_scroll_offset(&mut self, offset: (usize, usize))

Source

fn get_filter_pattern(&self) -> String

Source

fn set_filter_pattern(&mut self, pattern: String)

Source

fn is_filter_active(&self) -> bool

Source

fn set_filter_active(&mut self, active: bool)

Source

fn get_fuzzy_filter_pattern(&self) -> String

Source

fn set_fuzzy_filter_pattern(&mut self, pattern: String)

Source

fn is_fuzzy_filter_active(&self) -> bool

Source

fn set_fuzzy_filter_active(&mut self, active: bool)

Source

fn get_fuzzy_filter_indices(&self) -> &Vec<usize>

Source

fn set_fuzzy_filter_indices(&mut self, indices: Vec<usize>)

Source

fn clear_fuzzy_filter(&mut self)

Source

fn get_search_pattern(&self) -> String

Source

fn set_search_pattern(&mut self, pattern: String)

Source

fn get_search_matches(&self) -> Vec<(usize, usize)>

Source

fn set_search_matches(&mut self, matches: Vec<(usize, usize)>)

Source

fn get_current_match(&self) -> Option<(usize, usize)>

Source

fn set_current_match(&mut self, match_pos: Option<(usize, usize)>)

Source

fn get_search_match_index(&self) -> usize

Source

fn set_search_match_index(&mut self, index: usize)

Source

fn clear_search_state(&mut self)

Source

fn get_column_stats(&self) -> Option<&ColumnStatistics>

Source

fn set_column_stats(&mut self, stats: Option<ColumnStatistics>)

Source

fn get_sort_column(&self) -> Option<usize>

Source

fn set_sort_column(&mut self, column: Option<usize>)

Source

fn get_sort_order(&self) -> SortOrder

Source

fn set_sort_order(&mut self, order: SortOrder)

Source

fn is_compact_mode(&self) -> bool

Source

fn set_compact_mode(&mut self, compact: bool)

Source

fn is_show_row_numbers(&self) -> bool

Source

fn set_show_row_numbers(&mut self, show: bool)

Source

fn is_viewport_lock(&self) -> bool

Source

fn set_viewport_lock(&mut self, locked: bool)

Source

fn get_viewport_lock_row(&self) -> Option<usize>

Source

fn set_viewport_lock_row(&mut self, row: Option<usize>)

Source

fn get_column_widths(&self) -> &Vec<u16>

Source

fn set_column_widths(&mut self, widths: Vec<u16>)

Source

fn is_case_insensitive(&self) -> bool

Source

fn set_case_insensitive(&mut self, case_insensitive: bool)

Source

fn get_name(&self) -> String

Source

fn set_name(&mut self, name: String)

Source

fn get_file_path(&self) -> Option<&PathBuf>

Source

fn set_file_path(&mut self, path: Option<String>)

Source

fn is_modified(&self) -> bool

Source

fn set_modified(&mut self, modified: bool)

Source

fn get_last_query_source(&self) -> Option<String>

Source

fn set_last_query_source(&mut self, source: Option<String>)

Source

fn get_input_value(&self) -> String

Source

fn set_input_value(&mut self, value: String)

Source

fn get_input_cursor(&self) -> usize

Source

fn set_input_cursor(&mut self, pos: usize)

Source

fn apply_filter(&mut self) -> Result<()>

Source

fn apply_sort(&mut self) -> Result<()>

Source

fn search(&mut self) -> Result<()>

Source

fn clear_filters(&mut self)

Source

fn get_row_count(&self) -> usize

Source

fn get_column_count(&self) -> usize

Source

fn get_column_names(&self) -> Vec<String>

Source

fn get_undo_stack(&self) -> &Vec<(String, usize)>

Source

fn push_undo(&mut self, state: (String, usize))

Source

fn pop_undo(&mut self) -> Option<(String, usize)>

Source

fn get_redo_stack(&self) -> &Vec<(String, usize)>

Source

fn push_redo(&mut self, state: (String, usize))

Source

fn pop_redo(&mut self) -> Option<(String, usize)>

Source

fn clear_redo(&mut self)

Source

fn get_kill_ring(&self) -> String

Source

fn set_kill_ring(&mut self, text: String)

Source

fn is_kill_ring_empty(&self) -> bool

Source

fn perform_undo(&mut self) -> bool

Source

fn perform_redo(&mut self) -> bool

Source

fn save_state_for_undo(&mut self)

Source

fn get_last_visible_rows(&self) -> usize

Source

fn set_last_visible_rows(&mut self, rows: usize)

Source

fn debug_dump(&self) -> String

Source

fn get_input_text(&self) -> String

Source

fn set_input_text(&mut self, text: String)

Source

fn handle_input_key(&mut self, event: KeyEvent) -> bool

Source

fn switch_input_mode(&mut self, multiline: bool)

Source

fn get_input_cursor_position(&self) -> usize

Source

fn set_input_cursor_position(&mut self, position: usize)

Source

fn is_input_multiline(&self) -> bool

Source

fn navigate_history_up(&mut self, history: &[String]) -> bool

Source

fn navigate_history_down(&mut self, history: &[String]) -> bool

Source

fn reset_history_navigation(&mut self)

Source

fn clear_results(&mut self)

Implementors§