Skip to main content

Optimize

Enum Optimize 

Source
pub enum Optimize {
    Run {
        tax_year: i32,
    },
    Accept {
        tax_year: i32,
        disposal: Option<String>,
        attest: Option<String>,
    },
    Consult {
        sell: String,
        wallet: Option<String>,
        at: Option<String>,
        proceeds: Option<String>,
        fmv: bool,
    },
}
Expand description

optimize subcommand tree. Task 9 adds Run; Task 10 adds Accept; Task 11 adds Consult.

Variants§

§

Run

Mode-1 what-if: print the tax-saving lot-selection proposal. NOTHING is filed or bound.

Fields

§tax_year: i32

The tax year to optimize (must be 2025 or later).

§

Accept

Mode-1 gated persistence: recompute the optimum and persist the proposed LotSelection(s), gated per disposal (§1.1012-1(j)). A genuinely-contemporaneous pick (made ≤ sale) persists freely; an already-executed disposal persists ONLY with a narrow per-disposal --attest scoped to one --disposal; a 2027+ broker-held pick is refused. Revoke via reconcile void.

Fields

§tax_year: i32

The tax year to accept (must be 2025 or later).

§disposal: Option<String>

Restrict to ONE disposal (required to carry --attest).

§attest: Option<String>

Narrow contemporaneous-ID attestation for an already-executed disposal. Requires --disposal (no blanket attestation across all disposals).

§

Consult

Mode-2 read-only pre-trade what-if (§C.3): tax-min lots + ST/LT split + federal tax + ST→LT timing. NOTHING is written — no event, no side-table row. Tax decision-support only; not buy/sell/hold advice.

Fields

§sell: String

Hypothetical sale amount (required). Accepts a satoshi integer OR a BTC decimal, e.g. 0.05 or 5000000 (a value with a . is BTC; a bare integer is satoshis).

§wallet: Option<String>

Wallet to sell from, e.g. self:cold or exchange:coinbase:default (required; per-wallet pool is mandatory post-2025).

§at: Option<String>

Sale date for the what-if (YYYY-MM-DD; defaults to today UTC if omitted).

§proceeds: Option<String>

Explicit USD proceeds for the hypothetical sale. Required when --at is a future date with no bundled dataset price and --fmv is not used. Mutually exclusive with --fmv.

§fmv: bool

Use the bundled daily-close FMV for --at instead of an explicit proceeds amount. A future date with no dataset price will return a ProceedsRequired error. Mutually exclusive with --proceeds.

Trait Implementations§

Source§

impl FromArgMatches for Optimize

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Optimize

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V