pub struct App {Show 87 fields
pub theme: Theme,
pub envelopes: Vec<Envelope>,
pub all_envelopes: Vec<Envelope>,
pub mailbox_view: MailboxView,
pub labels: Vec<Label>,
pub screen: Screen,
pub mail_list_mode: MailListMode,
pub selected_index: usize,
pub scroll_offset: usize,
pub active_pane: ActivePane,
pub should_quit: bool,
pub layout_mode: LayoutMode,
pub search_bar: SearchBar,
pub search_page: SearchPageState,
pub command_palette: CommandPalette,
pub body_view_state: BodyViewState,
pub viewing_envelope: Option<Envelope>,
pub viewed_thread: Option<Thread>,
pub viewed_thread_messages: Vec<Envelope>,
pub thread_selected_index: usize,
pub message_scroll_offset: u16,
pub last_sync_status: Option<String>,
pub visible_height: usize,
pub body_cache: HashMap<MessageId, MessageBody>,
pub queued_body_fetches: Vec<MessageId>,
pub in_flight_body_requests: HashSet<MessageId>,
pub pending_thread_fetch: Option<ThreadId>,
pub in_flight_thread_fetch: Option<ThreadId>,
pub pending_search: Option<(String, SearchMode)>,
pub search_active: bool,
pub pending_rule_detail: Option<String>,
pub pending_rule_history: Option<String>,
pub pending_rule_dry_run: Option<String>,
pub pending_rule_delete: Option<String>,
pub pending_rule_upsert: Option<Value>,
pub pending_rule_form_load: Option<String>,
pub pending_rule_form_save: bool,
pub pending_bug_report: bool,
pub pending_log_open: bool,
pub pending_diagnostics_details: Option<DiagnosticsPaneKind>,
pub pending_account_save: Option<AccountConfigData>,
pub pending_account_test: Option<AccountConfigData>,
pub pending_account_authorize: Option<(AccountConfigData, bool)>,
pub pending_account_set_default: Option<String>,
pub sidebar_selected: usize,
pub sidebar_section: SidebarSection,
pub help_modal_open: bool,
pub help_scroll_offset: u16,
pub saved_searches: Vec<SavedSearch>,
pub subscriptions_page: SubscriptionsPageState,
pub rules_page: RulesPageState,
pub diagnostics_page: DiagnosticsPageState,
pub accounts_page: AccountsPageState,
pub active_label: Option<LabelId>,
pub pending_label_fetch: Option<LabelId>,
pub pending_active_label: Option<LabelId>,
pub pending_labels_refresh: bool,
pub pending_all_envelopes_refresh: bool,
pub pending_subscriptions_refresh: bool,
pub pending_status_refresh: bool,
pub desired_system_mailbox: Option<String>,
pub status_message: Option<String>,
pub pending_mutation_count: usize,
pub pending_mutation_status: Option<String>,
pub pending_mutation_queue: Vec<(Request, MutationEffect)>,
pub pending_compose: Option<ComposeAction>,
pub pending_send_confirm: Option<PendingSend>,
pub pending_bulk_confirm: Option<PendingBulkConfirm>,
pub error_modal: Option<ErrorModalState>,
pub pending_unsubscribe_confirm: Option<PendingUnsubscribeConfirm>,
pub pending_unsubscribe_action: Option<PendingUnsubscribeAction>,
pub reader_mode: bool,
pub signature_expanded: bool,
pub label_picker: LabelPicker,
pub compose_picker: ComposePicker,
pub attachment_panel: AttachmentPanelState,
pub snooze_panel: SnoozePanelState,
pub pending_attachment_action: Option<PendingAttachmentAction>,
pub selected_set: HashSet<MessageId>,
pub visual_mode: bool,
pub visual_anchor: Option<usize>,
pub pending_export_thread: Option<ThreadId>,
pub snooze_config: SnoozeConfig,
pub sidebar_system_expanded: bool,
pub sidebar_user_expanded: bool,
pub sidebar_saved_searches_expanded: bool,
pub url_modal: Option<UrlModalState>,
/* private fields */
}Fields§
§theme: Theme§envelopes: Vec<Envelope>§all_envelopes: Vec<Envelope>§mailbox_view: MailboxView§labels: Vec<Label>§screen: Screen§mail_list_mode: MailListMode§selected_index: usize§scroll_offset: usize§active_pane: ActivePane§should_quit: bool§layout_mode: LayoutMode§search_bar: SearchBar§search_page: SearchPageState§command_palette: CommandPalette§body_view_state: BodyViewState§viewing_envelope: Option<Envelope>§viewed_thread: Option<Thread>§viewed_thread_messages: Vec<Envelope>§thread_selected_index: usize§message_scroll_offset: u16§last_sync_status: Option<String>§visible_height: usize§body_cache: HashMap<MessageId, MessageBody>§queued_body_fetches: Vec<MessageId>§in_flight_body_requests: HashSet<MessageId>§pending_thread_fetch: Option<ThreadId>§in_flight_thread_fetch: Option<ThreadId>§pending_search: Option<(String, SearchMode)>§search_active: bool§pending_rule_detail: Option<String>§pending_rule_history: Option<String>§pending_rule_dry_run: Option<String>§pending_rule_delete: Option<String>§pending_rule_upsert: Option<Value>§pending_rule_form_load: Option<String>§pending_rule_form_save: bool§pending_bug_report: bool§pending_log_open: bool§pending_diagnostics_details: Option<DiagnosticsPaneKind>§pending_account_save: Option<AccountConfigData>§pending_account_test: Option<AccountConfigData>§pending_account_set_default: Option<String>§help_modal_open: bool§help_scroll_offset: u16§saved_searches: Vec<SavedSearch>§subscriptions_page: SubscriptionsPageState§rules_page: RulesPageState§diagnostics_page: DiagnosticsPageState§accounts_page: AccountsPageState§active_label: Option<LabelId>§pending_label_fetch: Option<LabelId>§pending_active_label: Option<LabelId>§pending_labels_refresh: bool§pending_all_envelopes_refresh: bool§pending_subscriptions_refresh: bool§pending_status_refresh: bool§desired_system_mailbox: Option<String>§status_message: Option<String>§pending_mutation_count: usize§pending_mutation_status: Option<String>§pending_mutation_queue: Vec<(Request, MutationEffect)>§pending_compose: Option<ComposeAction>§pending_send_confirm: Option<PendingSend>§pending_bulk_confirm: Option<PendingBulkConfirm>§error_modal: Option<ErrorModalState>§pending_unsubscribe_confirm: Option<PendingUnsubscribeConfirm>§pending_unsubscribe_action: Option<PendingUnsubscribeAction>§reader_mode: bool§signature_expanded: bool§label_picker: LabelPicker§compose_picker: ComposePicker§attachment_panel: AttachmentPanelState§snooze_panel: SnoozePanelState§pending_attachment_action: Option<PendingAttachmentAction>§selected_set: HashSet<MessageId>§visual_mode: bool§visual_anchor: Option<usize>§pending_export_thread: Option<ThreadId>§snooze_config: SnoozeConfig§url_modal: Option<UrlModalState>Implementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn from_config(config: &MxrConfig) -> Self
pub fn from_render_config(render: &RenderConfig) -> Self
pub fn selected_envelope(&self) -> Option<&Envelope>
pub fn mail_list_rows(&self) -> Vec<MailListRow>
pub fn search_mail_list_rows(&self) -> Vec<MailListRow>
pub fn selected_mail_row(&self) -> Option<MailListRow>
pub fn selected_subscription_entry(&self) -> Option<&SubscriptionEntry>
pub fn focused_thread_envelope(&self) -> Option<&Envelope>
pub fn selected_search_envelope(&self) -> Option<&Envelope>
pub fn selected_rule(&self) -> Option<&Value>
pub fn selected_account(&self) -> Option<&AccountSummaryData>
pub fn enter_account_setup_onboarding(&mut self)
pub async fn load(&mut self, client: &mut Client) -> Result<(), MxrError>
pub fn apply_status_snapshot( &mut self, uptime_secs: u64, daemon_pid: Option<u32>, accounts: Vec<String>, total_messages: u32, sync_statuses: Vec<AccountSyncStatus>, )
pub fn input_pending(&self) -> bool
pub fn ordered_visible_labels(&self) -> Vec<&Label>
Sourcepub fn visible_label_count(&self) -> usize
pub fn visible_label_count(&self) -> usize
Number of visible (non-hidden) labels.
Sourcepub fn visible_labels(&self) -> Vec<&Label>
pub fn visible_labels(&self) -> Vec<&Label>
Get the visible (filtered) labels.
Sourcepub fn mail_list_title(&self) -> String
pub fn mail_list_title(&self) -> String
Compute the mail list title based on active filter/search.
pub fn status_bar_state(&self) -> StatusBarState
pub fn resolve_desired_system_mailbox(&mut self)
pub fn auto_preview_search(&mut self)
Sourcepub fn queue_body_window(&mut self)
pub fn queue_body_window(&mut self)
Queue body prefetch for messages around the current cursor position. Only fetches bodies not already in cache.
pub fn next_background_timeout(&self, fallback: Duration) -> Duration
pub fn resolve_body_success(&mut self, body: MessageBody)
pub fn resolve_body_fetch_error( &mut self, message_id: &MessageId, message: String, )
pub fn current_viewing_body(&self) -> Option<&MessageBody>
pub fn selected_attachment(&self) -> Option<&AttachmentMeta>
pub fn open_attachment_panel(&mut self)
pub fn open_url_modal(&mut self)
pub fn close_attachment_panel(&mut self)
pub fn queue_attachment_action(&mut self, operation: AttachmentOperation)
pub fn resolve_attachment_file(&mut self, file: &AttachmentFile)
pub fn apply_local_label_refs( &mut self, message_ids: &[MessageId], add: &[String], remove: &[String], )
pub fn apply_local_flags(&mut self, message_id: &MessageId, flags: MessageFlags)
pub fn apply_local_flags_many(&mut self, updates: &[(MessageId, MessageFlags)])
pub fn finish_pending_mutation(&mut self)
pub fn show_mutation_failure(&mut self, error: &MxrError)
pub fn refresh_mailbox_after_mutation_failure(&mut self)
pub fn resolve_thread_success( &mut self, thread: Thread, messages: Vec<Envelope>, )
pub fn resolve_thread_fetch_error(&mut self, thread_id: &ThreadId)
pub fn set_subscriptions(&mut self, subscriptions: Vec<SubscriptionSummary>)
Trait 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
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