Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MarkusZoppelt/portfolio_rs
/ functions
Functions
385 in github.com/MarkusZoppelt/portfolio_rs
⨍
Functions
385
◇
Types & classes
64
↓ 65 callers
Function
bin
()
tests/e2e_offline.rs:5
↓ 40 callers
Method
is_disabled
(&self, component: Component)
src/tui.rs:189
↓ 37 callers
Method
path
Return the path to the configuration file.
src/config.rs:143
↓ 29 callers
Method
as_str
Returns the string representation of the component
src/tui.rs:82
↓ 28 callers
Method
get_ticker
(&self)
src/position.rs:93
↓ 27 callers
Method
title
(self)
src/tui.rs:480
↓ 21 callers
Function
get
(uri: &str)
tests/api_offline.rs:42
↓ 19 callers
Method
get_asset_class
(&self)
src/position.rs:67
↓ 18 callers
Method
get_balance
(&self)
src/position.rs:71
↓ 14 callers
Method
get_total_value
(&self)
src/portfolio.rs:41
↓ 14 callers
Method
total_invested
(&self)
src/position.rs:137
↓ 13 callers
Function
file_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 callers
Method
get_name
(&self)
src/position.rs:57
↓ 13 callers
Function
load_portfolio_file
Load portfolio JSON from a file path, supporting `.gpg` encryption.
src/services/portfolio_loader.rs:36
↓ 11 callers
Function
create_live_portfolio_with_logging
Returns a portfolio with the latest quotes, with optional per-position error logging.
src/services/portfolio_loader.rs:49
↓ 11 callers
Method
daily_variation_percent
(&self)
src/position.rs:170
↓ 11 callers
Function
resolve_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 callers
Function
router_with
( positions_json: &str, file_path: Option<String>, policy_file: Option<String>, )
tests/api_offline.rs:21
↓ 11 callers
Method
sort_positions_by_value_desc
(&mut self)
src/portfolio.rs:33
↓ 10 callers
Function
build_cli
()
src/cli.rs:75
↓ 10 callers
Method
get_amount
(&self)
src/position.rs:85
↓ 10 callers
Method
market_value
(&self)
src/position.rs:109
↓ 9 callers
Function
bin
()
tests/e2e_network.rs:11
↓ 9 callers
Function
body_json
(response: axum::response::Response)
tests/api_offline.rs:37
↓ 9 callers
Function
example_data
()
tests/e2e_network.rs:15
↓ 9 callers
Method
get_purchases
(&self)
src/position.rs:178
↓ 9 callers
Function
write_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 callers
Function
create_live_portfolio
Returns a portfolio with the latest quotes from JSON data.
src/services/portfolio_loader.rs:44
↓ 8 callers
Method
portfolio
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 callers
Method
get_historic_securities_value
Get the total value of all non-cash (securities) positions at a specific date
src/portfolio.rs:51
↓ 7 callers
Function
workspace_with_policy
Set up a workspace with a policy and return (tempdir, workspace dir, policy path).
tests/e2e_offline.rs:515
↓ 6 callers
Function
dry_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 callers
Function
example_data
()
tests/e2e_offline.rs:510
↓ 6 callers
Method
flow_metrics_since
(&self, start: DateTime<Utc>)
src/portfolio.rs:470
↓ 6 callers
Method
get_allocation
(&self)
src/state.rs:369
↓ 6 callers
Method
get_current_input_mut
(&mut self)
src/tui.rs:870
↓ 6 callers
Method
market_price
(&self)
src/position.rs:105
↓ 6 callers
Function
ok_response
(id: Option<serde_json::Value>, result: serde_json::Value)
src/commands/mcp.rs:68
↓ 6 callers
Function
parse_tab
(tab_str: Option<String>)
src/cli.rs:455
↓ 6 callers
Function
process_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 callers
Function
compute_weekly_series_batch
Efficient weekly series: one history fetch per ticker across full range, then sample weekly
src/tui.rs:336
↓ 5 callers
Function
default_balanced_growth_policy
()
src/policy.rs:8
↓ 5 callers
Function
dir_arg
`[DIR]` positional arg for a workspace-rooted directory, with `default`.
src/cli.rs:63
↓ 5 callers
Method
disable_component
(&mut self, component: Component)
src/tui.rs:185
↓ 5 callers
Function
get_arg_value
(matches: Option<&ArgMatches>, arg_name: &str)
src/cli.rs:451
↓ 5 callers
Method
mark_refreshed
(&mut self)
src/tui.rs:665
↓ 5 callers
Method
parse
(value: &str)
src/theme.rs:27
↓ 5 callers
Function
path_to_string
(path: &Path)
src/state.rs:54
↓ 5 callers
Method
pnl
(&self)
src/position.rs:157
↓ 5 callers
Function
position_to_dto
(id: usize, position: &PortfolioPosition)
src/state.rs:975
↓ 5 callers
Method
set_portfolio
(&mut self, portfolio: Portfolio)
src/tui.rs:616
↓ 4 callers
Method
average_cost
(&self)
src/position.rs:113
↓ 4 callers
Method
draft_decision
Draft a structured decision record.
src/state.rs:703
↓ 4 callers
Method
exit_edit_mode
(&mut self)
src/tui.rs:713
↓ 4 callers
Method
generate_report
Generate a weekly Markdown report.
src/state.rs:652
↓ 4 callers
Method
historic_variation_percent
(&self)
src/position.rs:162
↓ 4 callers
Function
init_workspace
(dir: &str, dry_run: bool)
src/workspace.rs:23
↓ 4 callers
Function
parse_purchase_date
(date_str: &str)
src/position.rs:255
↓ 4 callers
Function
policy_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 callers
Function
positions_to_string
Serialize a list of positions to pretty-printed JSON.
src/lib.rs:68
↓ 4 callers
Function
render_asset_breakdown_grouped
(f: &mut Frame, area: Rect, portfolio: &Portfolio, app: &App)
src/tui.rs:2920
↓ 4 callers
Function
render_detailed_allocation_positions
(f: &mut Frame, area: Rect, portfolio: &Portfolio)
src/tui.rs:1725
↓ 4 callers
Method
save
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 callers
Function
simulate_rebalance
Simulate rebalancing scenarios for `portfolio` against `policy`. This is purely analytical: no trades are executed.
src/simulate.rs:58
↓ 4 callers
Function
test_policy
Write a broad test policy into a fresh temp dir and return (guard, path).
tests/e2e_network.rs:20
↓ 4 callers
Method
update_trends
(&mut self, portfolio: &Portfolio)
src/tui.rs:639
↓ 3 callers
Method
add_position
(&self, req: CreatePositionRequest)
src/state.rs:487
↓ 3 callers
Function
create_test_policy
()
src/review.rs:401
↓ 3 callers
Function
format_arg
`--format <FORMAT>` option restricted to `markdown`/`json`, defaulting to `markdown`. Callers override `.help(...)` for command-specific wording.
src/cli.rs:44
↓ 3 callers
Function
format_currency
(value: f64, currency: &str)
src/tui.rs:194
↓ 3 callers
Function
from_string
(data: &str)
src/position.rs:187
↓ 3 callers
Function
get_historic_price
get the price at a given date, cache on success, fallback to cache on failure
src/position.rs:267
↓ 3 callers
Method
get_name_option
(&self)
src/position.rs:97
↓ 3 callers
Function
get_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 callers
Method
invalidate_portfolio_cache
Drop the cached portfolio so the next read re-fetches quotes.
src/state.rs:221
↓ 3 callers
Function
json_request
(method: &str, uri: &str, body: serde_json::Value)
tests/api_offline.rs:46
↓ 3 callers
Function
percent
(value: f64, total: f64)
src/context.rs:346
↓ 3 callers
Function
persist
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 callers
Method
save
Persist the config to disk.
src/config.rs:137
↓ 3 callers
Method
to_toml
(&self)
src/policy.rs:214
↓ 2 callers
Function
centered_rect
(percent_x: u16, percent_y: u16, r: Rect)
src/tui.rs:2900
↓ 2 callers
Function
check_workspace
Check a workspace directory for common health issues.
src/doctor.rs:32
↓ 2 callers
Function
create_router
Build the API router around an initialized [`ApiState`].
src/api/mod.rs:122
↓ 2 callers
Method
delete_position
(&self, id: usize)
src/state.rs:569
↓ 2 callers
Function
dir_option_arg
`--dir <DIR>` option for a workspace directory, with `default`.
src/cli.rs:68
↓ 2 callers
Method
effective_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 callers
Function
error_response
(id: Option<serde_json::Value>, code: i32, message: String)
src/commands/mcp.rs:77
↓ 2 callers
Method
fetch_portfolio
Fetch live quotes, update the network status, and refill the cache.
src/state.rs:209
↓ 2 callers
Method
find_and_update_position_by_identifier
( &self, sorted_position_index: usize, updater: F, )
src/tui.rs:961
↓ 2 callers
Function
generate_decision_draft
Generate the Markdown body of a structured decision draft.
src/decision.rs:6
↓ 2 callers
Function
generate_markdown_report
Generate the Markdown body of a weekly portfolio report.
src/report.rs:6
↓ 2 callers
Method
get_current_input
(&self)
src/tui.rs:862
↓ 2 callers
Method
get_portfolio_summary
(&self)
src/state.rs:295
↓ 2 callers
Function
get_quote_price
Get the latest price for a ticker, cache on success, fallback to cache on failure
src/position.rs:193
↓ 2 callers
Method
get_trend_color
(&self, name: &str, base_color: Color)
src/tui.rs:670
↓ 2 callers
Function
handle_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 callers
Method
load_file
Load a portfolio file (plaintext or `.gpg`) into state.
src/state.rs:74
↓ 2 callers
Method
next_edit_field
(&mut self)
src/tui.rs:846
↓ 2 callers
Method
policy_path
Resolve the effective policy file path.
src/state.rs:163
↓ 2 callers
Method
previous_edit_field
(&mut self)
src/tui.rs:854
next →
1–100 of 385, ranked by callers