pub struct App {Show 32 fields
pub running_state: RunningState,
pub config: Config,
pub patchsets: Paginated<Patchset>,
pub active_remote: String,
pub error_state: Option<String>,
pub mailing_lists: Vec<MailingList>,
pub selected_index: usize,
pub terminal_height: u16,
pub active_remote_index: usize,
pub focus: FocusPanel,
pub view_mode: ViewMode,
pub selected_detail: Option<PatchsetDetail>,
pub loading_context: Option<LoadingContext>,
pub stats: Option<ServerStats>,
pub show_help: bool,
pub show_bookmarks_only: bool,
pub detail_scroll_offset: usize,
pub list_params: ListParams,
pub input_mode: InputMode,
pub search_buffer: String,
pub search_cursor: usize,
pub sidebar_section: SidebarSection,
pub sidebar_list_index: usize,
pub bookmarks: BookmarkStore,
pub bookmarks_path: PathBuf,
pub comment_positions: Vec<usize>,
pub current_comment_index: Option<usize>,
pub list_content: ListContent,
pub messages: Paginated<EmailMessage>,
pub selected_message: Option<EmailMessage>,
pub sort_column: SortColumn,
pub sort_direction: SortDirection,
}Expand description
Top-level application state.
All mutable state the TUI needs lives here. The update() function
in crate::update is the sole mutator — the TEA pattern keeps
state transitions pure and testable.
Fields§
§running_state: RunningStateWhether the app is running or exiting.
config: ConfigLoaded configuration.
patchsets: Paginated<Patchset>Currently displayed patchset list.
active_remote: StringName of the active remote/mailbox.
error_state: Option<String>Current error message to display, if any.
mailing_lists: Vec<MailingList>Available mailing lists from the active remote.
selected_index: usizeIndex of the currently selected patchset in the list.
terminal_height: u16Cached terminal height for half-page scroll calculation.
active_remote_index: usizeIndex of the currently active remote in config.remotes.
focus: FocusPanelWhich panel currently has keyboard focus.
view_mode: ViewModeCurrent view mode (list vs. detail).
selected_detail: Option<PatchsetDetail>Loaded patchset detail for the detail view.
loading_context: Option<LoadingContext>Context for the loading screen (patchset being fetched).
stats: Option<ServerStats>Cached server stats from the last successful /api/stats response.
show_help: boolWhether the help overlay is currently visible.
show_bookmarks_only: boolWhether the list view is filtered to bookmarked patchsets only.
detail_scroll_offset: usizeVertical scroll offset for the detail view content.
list_params: ListParamsCurrent query parameters for the patchset list. Shared by pagination, search, and mailing list filter.
input_mode: InputModeCurrent keyboard input mode.
search_buffer: StringContents of the search input buffer (while typing).
search_cursor: usizeCursor position within search_buffer (char index).
Which section of the sidebar has focus.
Scroll index within the mailing list section (0 = “All”).
bookmarks: BookmarkStoreSet of bookmarked patchsets.
bookmarks_path: PathBufPath to the bookmarks persistence file.
comment_positions: Vec<usize>Cached line positions of comment boundaries in the detail view.
current_comment_index: Option<usize>Index into comment_positions for the current comment.
list_content: ListContentWhat content the list view is displaying (patchsets or messages).
messages: Paginated<EmailMessage>Currently displayed message list (when list_content == Messages).
selected_message: Option<EmailMessage>Loaded message detail for the message detail view.
sort_column: SortColumnWhich column the patchset list is sorted by.
sort_direction: SortDirectionCurrent sort direction.
Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more