pub struct App {Show 14 fields
pub user_id: Uuid,
pub active_tab: Tab,
pub overlays: OverlayStack,
pub cmdline: CmdLine,
pub edit_mode: EditMode,
pub status: String,
pub should_quit: bool,
pub console_focused: bool,
pub accounts: ListTab,
pub transactions: ListTab,
pub commodities: ListTab,
pub reports: ReportsTab,
pub config: ConfigTab,
pub console: ConsoleState,
/* private fields */
}Fields§
§user_id: Uuid§active_tab: Tab§overlays: OverlayStack§cmdline: CmdLine§edit_mode: EditMode§status: String§should_quit: bool§console_focused: boolWhether the console input prompt has keyboard focus.
accounts: ListTab§transactions: ListTab§commodities: ListTab§reports: ReportsTab§config: ConfigTab§console: ConsoleStateImplementations§
Source§impl App
impl App
Sourcepub fn open_transaction_edit_async(&mut self, id: &str)
pub fn open_transaction_edit_async(&mut self, id: &str)
Dispatch (get-transaction-detail "<id>") with RouteCtx::TransactionEdit.
The async reply opens the edit form (or sets a status on parse failure).
Source§impl App
impl App
Sourcepub fn fetch_report(
&mut self,
kind: ReportKind,
from: &str,
to: &str,
chart: &str,
)
pub fn fetch_report( &mut self, kind: ReportKind, from: &str, to: &str, chart: &str, )
Submit a report fetch for the given kind + date range + chart shape.
pub fn submit_console_form(&mut self, form: String)
pub fn interrupt_console(&self)
pub fn drain_eval(&mut self)
pub fn drain_console(&mut self)
pub fn refresh_tab(&mut self, tab: Tab)
pub fn fetch_config(&mut self)
pub fn submit_config_set(&mut self, key: &str, value: &str) -> bool
Sourcepub fn submit_commodity_create(&mut self, symbol: &str, name: &str) -> bool
pub fn submit_commodity_create(&mut self, symbol: &str, name: &str) -> bool
Submit a create-commodity mutation. Returns false only if the eval worker has stopped.
Sourcepub fn submit_account_create(
&mut self,
name: &str,
parent: Option<&str>,
) -> bool
pub fn submit_account_create( &mut self, name: &str, parent: Option<&str>, ) -> bool
Submit a create-account mutation. Returns false only if the eval worker has stopped.
Sourcepub fn submit_transaction_create(
&mut self,
splits: &[LogicalSplitInput],
note: &str,
date: &str,
) -> bool
pub fn submit_transaction_create( &mut self, splits: &[LogicalSplitInput], note: &str, date: &str, ) -> bool
Submit a create-transaction-logical mutation. Returns false only if the eval worker
has stopped or the payload fails to build.
Source§impl App
impl App
Sourcepub fn fetch_account_form_options(&mut self)
pub fn fetch_account_form_options(&mut self)
Issue a list-accounts fetch to populate the parent Select in the open
account-create form. Bumps form_options_seq so a stale reply is dropped.
Sourcepub fn fetch_transaction_form_options(&mut self)
pub fn fetch_transaction_form_options(&mut self)
Issue list-accounts + list-commodities to populate the Selects in
the open transaction-create/edit form. Both requests share the same seq.
Sourcepub fn fetch_commodity_convert_form_options(&mut self)
pub fn fetch_commodity_convert_form_options(&mut self)
Issue a list-commodities fetch to populate the two Selects in the open
commodity-convert form. Bumps form_options_seq so a stale reply is dropped.
Source§impl App
impl App
Sourcepub fn submit_delete_transaction(&mut self, id: &str) -> bool
pub fn submit_delete_transaction(&mut self, id: &str) -> bool
Submit a delete-transaction mutation. Returns false only if the eval worker has stopped.
Source§impl App
impl App
pub fn new(user_id: Uuid, edit_mode: EditMode) -> Self
pub fn active_view(&self) -> ViewRef<'_>
pub fn active_view_mut(&mut self) -> ViewMut<'_>
pub fn queue_chart(&mut self, spec: ChartSpec)
pub fn take_pending_chart(&mut self) -> Option<ChartSpec>
pub fn next_tab(&mut self)
pub fn previous_tab(&mut self)
pub fn switch_tab(&mut self, tab: Tab)
pub fn open_command_line(&mut self)
pub fn close_command_line(&mut self)
pub fn set_status(&mut self, msg: impl Into<String>)
pub fn request_quit(&mut self)
pub fn set_edit_mode(&mut self, mode: EditMode)
pub fn attach_console(&mut self, eval: ConsoleEval)
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