pub struct App<S>{Show 16 fields
pub mode: Mode,
pub state: AppState,
pub query_input: String,
pub search_input: String,
pub entries: Vec<Entry>,
pub selected: usize,
pub scroll: usize,
pub sort_column: Column,
pub sort_order: SortOrder,
pub status_message: String,
pub status_color: Color,
pub status_timestamp: u64,
pub history: Vec<String>,
pub history_index: Option<usize>,
pub detail_scroll: usize,
pub help_scroll: usize,
/* private fields */
}Expand description
Main TUI application
Fields§
§mode: ModeCurrent application mode
state: AppStateApplication state
query_input: StringCurrent query input
search_input: StringCurrent search input
entries: Vec<Entry>Query results
selected: usizeSelected entry index
scroll: usizeScroll offset
sort_column: ColumnCurrent sort column
sort_order: SortOrderCurrent sort order
status_message: StringStatus message
status_color: ColorStatus message color
status_timestamp: u64Status message timestamp (for auto-clear)
history: Vec<String>Query history
history_index: Option<usize>History index (for navigation)
detail_scroll: usizeDetail view scroll offset
help_scroll: usizeHelp scroll offset
Implementations§
Source§impl<S> App<S>where
S: Storage,
impl<S> App<S>where
S: Storage,
Sourcepub async fn execute_query(&mut self, query: &str)
pub async fn execute_query(&mut self, query: &str)
Execute a query and update entries
Sourcepub async fn clear_search(&mut self)
pub async fn clear_search(&mut self)
Clear search and reload all entries
Sourcepub fn set_status(&mut self, msg: String, color: Color)
pub fn set_status(&mut self, msg: String, color: Color)
Set status message
Sourcepub fn should_clear_status(&self) -> bool
pub fn should_clear_status(&self) -> bool
Check if status message should be cleared (after 5 seconds)
Sourcepub fn reset_status(&mut self)
pub fn reset_status(&mut self)
Clear status message to default
Sourcepub fn select_previous(&mut self)
pub fn select_previous(&mut self)
Select previous entry
Sourcepub fn select_next(&mut self, height: usize)
pub fn select_next(&mut self, height: usize)
Select next entry
Sourcepub fn sort_entries(&mut self)
pub fn sort_entries(&mut self)
Sort entries by current column
Sourcepub fn toggle_sort(&mut self, column: Column)
pub fn toggle_sort(&mut self, column: Column)
Toggle sort order for current column
Sourcepub fn history_previous(&mut self)
pub fn history_previous(&mut self)
Navigate history backwards
Sourcepub fn history_next(&mut self)
pub fn history_next(&mut self)
Navigate history forwards
Sourcepub fn selected_entry(&self) -> Option<&Entry>
pub fn selected_entry(&self) -> Option<&Entry>
Get selected entry
Sourcepub fn detail_scroll_down(&mut self)
pub fn detail_scroll_down(&mut self)
Scroll detail view down
Sourcepub fn detail_scroll_up(&mut self)
pub fn detail_scroll_up(&mut self)
Scroll detail view up
Sourcepub fn detail_scroll_reset(&mut self)
pub fn detail_scroll_reset(&mut self)
Reset detail scroll
Sourcepub fn help_scroll_down(&mut self)
pub fn help_scroll_down(&mut self)
Scroll help view down
Sourcepub fn help_scroll_up(&mut self)
pub fn help_scroll_up(&mut self)
Scroll help view up
Auto Trait Implementations§
impl<S> Freeze for App<S>where
S: ?Sized,
impl<S> RefUnwindSafe for App<S>where
S: RefUnwindSafe + ?Sized,
impl<S> Send for App<S>where
S: ?Sized,
impl<S> Sync for App<S>where
S: ?Sized,
impl<S> Unpin for App<S>where
S: ?Sized,
impl<S> UnsafeUnpin for App<S>where
S: ?Sized,
impl<S> UnwindSafe for App<S>where
S: RefUnwindSafe + ?Sized,
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
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>
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>
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