pub struct DataTableBuffer { /* private fields */ }
Expand description
A Buffer implementation backed by DataTable
This allows us to integrate our clean DataTable
architecture with the existing enhanced TUI
Implementations§
Source§impl DataTableBuffer
impl DataTableBuffer
Sourcepub fn view(&self) -> &DataTableView
pub fn view(&self) -> &DataTableView
Get the DataTableView
(read-only access)
Trait Implementations§
Source§impl BufferAPI for DataTableBuffer
impl BufferAPI for DataTableBuffer
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 get_original_source(&self) -> Option<&DataTable>
fn set_datatable(&mut self, datatable: Option<Arc<DataTable>>)
Source§fn set_results_as_datatable(
&mut self,
_response: Option<QueryResponse>,
) -> Result<(), String>
fn set_results_as_datatable( &mut self, _response: Option<QueryResponse>, ) -> Result<(), String>
V50: Helper to convert
QueryResponse
to DataTable
and store itfn 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 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_column_widths(&self) -> &Vec<u16>
fn set_column_widths(&mut self, widths: Vec<u16>)
fn is_compact_mode(&self) -> bool
fn set_compact_mode(&mut self, compact: 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 is_show_row_numbers(&self) -> bool
fn set_show_row_numbers(&mut self, show: bool)
fn is_case_insensitive(&self) -> bool
fn set_case_insensitive(&mut self, insensitive: bool)
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 get_kill_ring(&self) -> String
fn set_kill_ring(&mut self, text: String)
fn get_last_visible_rows(&self) -> usize
fn set_last_visible_rows(&mut self, rows: 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 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 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 clear_results(&mut self)
Auto Trait Implementations§
impl !Freeze for DataTableBuffer
impl !RefUnwindSafe for DataTableBuffer
impl Send for DataTableBuffer
impl Sync for DataTableBuffer
impl Unpin for DataTableBuffer
impl !UnwindSafe for DataTableBuffer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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