Skip to main content

render_consult

Function render_consult 

Source
pub fn render_consult(r: &ConsultReport) -> String
Expand description

Render a ConsultReport (Task 11 / §C.3 Mode-2 read-only pre-trade what-if) for the optimize consult command. Returns a String with:

  • The hypothetical sale header (sat amount, wallet, date).
  • The proposed lot selection (the tax-minimizing picks).
  • The ST/LT gain split and the federal tax attributable to this contemplated sale.
  • When timing.is_some(): the ST→LT crossover line (crossover date + saving), OMITTED when None.
  • A footer: tax decision-support only, not investment advice.

READ-ONLY: this function only renders; it never writes any event or side-table row.