MCPcopy Index your code

hub / github.com/MarkusZoppelt/portfolio_rs / functions

Functions385 in github.com/MarkusZoppelt/portfolio_rs

↓ 65 callersFunctionbin
()
tests/e2e_offline.rs:5
↓ 40 callersMethodis_disabled
(&self, component: Component)
src/tui.rs:189
↓ 37 callersMethodpath
Return the path to the configuration file.
src/config.rs:143
↓ 29 callersMethodas_str
Returns the string representation of the component
src/tui.rs:82
↓ 28 callersMethodget_ticker
(&self)
src/position.rs:93
↓ 27 callersMethodtitle
(self)
src/tui.rs:480
↓ 21 callersFunctionget
(uri: &str)
tests/api_offline.rs:42
↓ 19 callersMethodget_asset_class
(&self)
src/position.rs:67
↓ 18 callersMethodget_balance
(&self)
src/position.rs:71
↓ 14 callersMethodget_total_value
(&self)
src/portfolio.rs:41
↓ 14 callersMethodtotal_invested
(&self)
src/position.rs:137
↓ 13 callersFunctionfile_arg
`[FILE]` positional arg for the portfolio JSON file, reused by nearly every subcommand (falls back to the config file when omitted).
src/cli.rs:27
↓ 13 callersMethodget_name
(&self)
src/position.rs:57
↓ 13 callersFunctionload_portfolio_file
Load portfolio JSON from a file path, supporting `.gpg` encryption.
src/services/portfolio_loader.rs:36
↓ 11 callersFunctioncreate_live_portfolio_with_logging
Returns a portfolio with the latest quotes, with optional per-position error logging.
src/services/portfolio_loader.rs:49
↓ 11 callersMethoddaily_variation_percent
(&self)
src/position.rs:170
↓ 11 callersFunctionresolve_portfolio_file
Resolve the portfolio file: an explicit `FILE` argument wins, otherwise fall back to the configured portfolio file (workspace-aware).
src/commands/mod.rs:26
↓ 11 callersFunctionrouter_with
( positions_json: &str, file_path: Option<String>, policy_file: Option<String>, )
tests/api_offline.rs:21
↓ 11 callersMethodsort_positions_by_value_desc
(&mut self)
src/portfolio.rs:33
↓ 10 callersFunctionbuild_cli
()
src/cli.rs:75
↓ 10 callersMethodget_amount
(&self)
src/position.rs:85
↓ 10 callersMethodmarket_value
(&self)
src/position.rs:109
↓ 9 callersFunctionbin
()
tests/e2e_network.rs:11
↓ 9 callersFunctionbody_json
(response: axum::response::Response)
tests/api_offline.rs:37
↓ 9 callersFunctionexample_data
()
tests/e2e_network.rs:15
↓ 9 callersMethodget_purchases
(&self)
src/position.rs:178
↓ 9 callersFunctionwrite_dated_document
Write `content` to `file_path`, refusing to clobber an existing file. A dry-run only previews `content`; it never writes to disk and must never trip
src/document.rs:19
↓ 8 callersFunctioncreate_live_portfolio
Returns a portfolio with the latest quotes from JSON data.
src/services/portfolio_loader.rs:44
↓ 8 callersMethodportfolio
Build a live portfolio from the current JSON. Results are cached for a short TTL so bursts of reads (e.g. several HTTP requests) do not hammer the qu
src/state.rs:196
↓ 7 callersMethodget_historic_securities_value
Get the total value of all non-cash (securities) positions at a specific date
src/portfolio.rs:51
↓ 7 callersFunctionworkspace_with_policy
Set up a workspace with a policy and return (tempdir, workspace dir, policy path).
tests/e2e_offline.rs:515
↓ 6 callersFunctiondry_run_arg
`--dry-run` flag shared by every command that mutates the filesystem, so previews are spelled and behave identically everywhere.
src/cli.rs:55
↓ 6 callersFunctionexample_data
()
tests/e2e_offline.rs:510
↓ 6 callersMethodflow_metrics_since
(&self, start: DateTime<Utc>)
src/portfolio.rs:470
↓ 6 callersMethodget_allocation
(&self)
src/state.rs:369
↓ 6 callersMethodget_current_input_mut
(&mut self)
src/tui.rs:870
↓ 6 callersMethodmarket_price
(&self)
src/position.rs:105
↓ 6 callersFunctionok_response
(id: Option<serde_json::Value>, result: serde_json::Value)
src/commands/mcp.rs:68
↓ 6 callersFunctionparse_tab
(tab_str: Option<String>)
src/cli.rs:455
↓ 6 callersFunctionprocess_request
Handle one JSON-RPC message. Returns `None` for notifications (messages with no `id`), which per the JSON-RPC spec never get a response — e.g. the `no
src/commands/mcp.rs:89
↓ 5 callersFunctioncompute_weekly_series_batch
Efficient weekly series: one history fetch per ticker across full range, then sample weekly
src/tui.rs:336
↓ 5 callersFunctiondefault_balanced_growth_policy
()
src/policy.rs:8
↓ 5 callersFunctiondir_arg
`[DIR]` positional arg for a workspace-rooted directory, with `default`.
src/cli.rs:63
↓ 5 callersMethoddisable_component
(&mut self, component: Component)
src/tui.rs:185
↓ 5 callersFunctionget_arg_value
(matches: Option<&ArgMatches>, arg_name: &str)
src/cli.rs:451
↓ 5 callersMethodmark_refreshed
(&mut self)
src/tui.rs:665
↓ 5 callersMethodparse
(value: &str)
src/theme.rs:27
↓ 5 callersFunctionpath_to_string
(path: &Path)
src/state.rs:54
↓ 5 callersMethodpnl
(&self)
src/position.rs:157
↓ 5 callersFunctionposition_to_dto
(id: usize, position: &PortfolioPosition)
src/state.rs:975
↓ 5 callersMethodset_portfolio
(&mut self, portfolio: Portfolio)
src/tui.rs:616
↓ 4 callersMethodaverage_cost
(&self)
src/position.rs:113
↓ 4 callersMethoddraft_decision
Draft a structured decision record.
src/state.rs:703
↓ 4 callersMethodexit_edit_mode
(&mut self)
src/tui.rs:713
↓ 4 callersMethodgenerate_report
Generate a weekly Markdown report.
src/state.rs:652
↓ 4 callersMethodhistoric_variation_percent
(&self)
src/position.rs:162
↓ 4 callersFunctioninit_workspace
(dir: &str, dry_run: bool)
src/workspace.rs:23
↓ 4 callersFunctionparse_purchase_date
(date_str: &str)
src/position.rs:255
↓ 4 callersFunctionpolicy_arg
`--policy <FILE>` option pointing at a `policy.toml`, defaulting to the standard workspace location. Callers override `.help(...)` for command-specifi
src/cli.rs:34
↓ 4 callersFunctionpositions_to_string
Serialize a list of positions to pretty-printed JSON.
src/lib.rs:68
↓ 4 callersFunctionrender_asset_breakdown_grouped
(f: &mut Frame, area: Rect, portfolio: &Portfolio, app: &App)
src/tui.rs:2920
↓ 4 callersFunctionrender_detailed_allocation_positions
(f: &mut Frame, area: Rect, portfolio: &Portfolio)
src/tui.rs:1725
↓ 4 callersMethodsave
Persist the current positions back to the original file. Refuses to write `.gpg`-backed portfolios: decrypted content must never be written to disk.
src/state.rs:242
↓ 4 callersFunctionsimulate_rebalance
Simulate rebalancing scenarios for `portfolio` against `policy`. This is purely analytical: no trades are executed.
src/simulate.rs:58
↓ 4 callersFunctiontest_policy
Write a broad test policy into a fresh temp dir and return (guard, path).
tests/e2e_network.rs:20
↓ 4 callersMethodupdate_trends
(&mut self, portfolio: &Portfolio)
src/tui.rs:639
↓ 3 callersMethodadd_position
(&self, req: CreatePositionRequest)
src/state.rs:487
↓ 3 callersFunctioncreate_test_policy
()
src/review.rs:401
↓ 3 callersFunctionformat_arg
`--format <FORMAT>` option restricted to `markdown`/`json`, defaulting to `markdown`. Callers override `.help(...)` for command-specific wording.
src/cli.rs:44
↓ 3 callersFunctionformat_currency
(value: f64, currency: &str)
src/tui.rs:194
↓ 3 callersFunctionfrom_string
(data: &str)
src/position.rs:187
↓ 3 callersFunctionget_historic_price
get the price at a given date, cache on success, fallback to cache on failure
src/position.rs:267
↓ 3 callersMethodget_name_option
(&self)
src/position.rs:97
↓ 3 callersFunctionget_quote_name
Try to get the short name for a ticker from Yahoo Finance, cache on success, fallback to cache on failure
src/position.rs:305
↓ 3 callersMethodinvalidate_portfolio_cache
Drop the cached portfolio so the next read re-fetches quotes.
src/state.rs:221
↓ 3 callersFunctionjson_request
(method: &str, uri: &str, body: serde_json::Value)
tests/api_offline.rs:46
↓ 3 callersFunctionpercent
(value: f64, total: f64)
src/context.rs:346
↓ 3 callersFunctionpersist
Persist after a successful mutation, unless the portfolio is `.gpg`-backed (which is never rewritten) or purely in-memory.
src/api/mod.rs:184
↓ 3 callersMethodsave
Persist the config to disk.
src/config.rs:137
↓ 3 callersMethodto_toml
(&self)
src/policy.rs:214
↓ 2 callersFunctioncentered_rect
(percent_x: u16, percent_y: u16, r: Rect)
src/tui.rs:2900
↓ 2 callersFunctioncheck_workspace
Check a workspace directory for common health issues.
src/doctor.rs:32
↓ 2 callersFunctioncreate_router
Build the API router around an initialized [`ApiState`].
src/api/mod.rs:122
↓ 2 callersMethoddelete_position
(&self, id: usize)
src/state.rs:569
↓ 2 callersFunctiondir_option_arg
`--dir <DIR>` option for a workspace directory, with `default`.
src/cli.rs:68
↓ 2 callersMethodeffective_portfolio_file
Resolve the effective portfolio file path. - In workspace mode, returns `<workspace_dir>/positions.json` if the workspace exists. - In simple mode, r
src/config.rs:157
↓ 2 callersFunctionerror_response
(id: Option<serde_json::Value>, code: i32, message: String)
src/commands/mcp.rs:77
↓ 2 callersMethodfetch_portfolio
Fetch live quotes, update the network status, and refill the cache.
src/state.rs:209
↓ 2 callersMethodfind_and_update_position_by_identifier
( &self, sorted_position_index: usize, updater: F, )
src/tui.rs:961
↓ 2 callersFunctiongenerate_decision_draft
Generate the Markdown body of a structured decision draft.
src/decision.rs:6
↓ 2 callersFunctiongenerate_markdown_report
Generate the Markdown body of a weekly portfolio report.
src/report.rs:6
↓ 2 callersMethodget_current_input
(&self)
src/tui.rs:862
↓ 2 callersMethodget_portfolio_summary
(&self)
src/state.rs:295
↓ 2 callersFunctionget_quote_price
Get the latest price for a ticker, cache on success, fallback to cache on failure
src/position.rs:193
↓ 2 callersMethodget_trend_color
(&self, name: &str, base_color: Color)
src/tui.rs:670
↓ 2 callersFunctionhandle_position
Get the latest price for a ticker and update the positionthen then return the updated position as a new object
src/position.rs:333
↓ 2 callersMethodload_file
Load a portfolio file (plaintext or `.gpg`) into state.
src/state.rs:74
↓ 2 callersMethodnext_edit_field
(&mut self)
src/tui.rs:846
↓ 2 callersMethodpolicy_path
Resolve the effective policy file path.
src/state.rs:163
↓ 2 callersMethodprevious_edit_field
(&mut self)
src/tui.rs:854
next →1–100 of 385, ranked by callers