Skip to main content

Form8949Row

Struct Form8949Row 

Source
pub struct Form8949Row {
Show 13 fields pub part: Form8949Part, pub box_: Form8949Box, pub box_needs_review: bool, pub description: String, pub date_acquired: TaxDate, pub date_sold: TaxDate, pub proceeds: Usd, pub cost_basis: Usd, pub adjustment_code: String, pub adjustment_amount: Usd, pub gain: Usd, pub wallet: WalletId, pub disposition_kind: DisposeKind,
}
Expand description

One Form 8949 row = one DisposalLeg disposed in the tax year. A pure projection of the leg; no gain/basis/term math is performed here (all of it is already on the leg from the fold).

Fields§

§part: Form8949Part

Part I (ST) or Part II (LT), from leg.term.

§box_: Form8949Box

The conservative “not reported to the IRS” box, chosen year-aware by form_8949: pre-TY2025 the securities boxes C (ST) / F (LT); from TY2025 the digital-asset boxes I (ST) / L (LT) — the securities boxes are forbidden for digital assets on the 2025 revision (D4).

§box_needs_review: bool

true iff the disposing wallet is an Exchange (matches!(leg.wallet, Exchange { .. })) — such a disposition MAY have been reported to the IRS by the broker (1099-DA from TY2025; 1099-B before), so the conservative default should be reviewed and reclassified: pre-TY2025 to A/B (ST) or D/E (LT) if a 1099-B was issued; from TY2025 to G/H (ST) or J/K (LT) if a 1099-DA was issued. Direct match on leg.wallet (D4/[R0-M2]) — never the private optimize.rs::is_broker.

§description: String

Column (a): the BTC amount, 8dp + " BTC" (e.g. "0.53000000 BTC"). Computed as EXACT Decimal (Decimal::from(sat) / SATS_PER_BTC) — NEVER sat as f64 / 1e8 [R0-M5].

§date_acquired: TaxDate

Column (b): date acquired = the leg’s zone-aware holding-period start (leg.acquired_at).

§date_sold: TaxDate

Column (c): date sold = the disposal’s disposed_at.

§proceeds: Usd

Column (d): proceeds (allocated net proceeds, from the leg).

§cost_basis: Usd

Column (e): cost basis (tax-reported basis, from the leg).

§adjustment_code: String

Column (f): adjustment code — always empty. No §1091 (wash sale is N/A to crypto) and no other adjustments are modelled.

§adjustment_amount: Usd

Column (g): adjustment amount — always 0. See adjustment_code.

§gain: Usd

Column (h): gain/loss (from the leg; for a NoGainNoLoss dual-basis gift leg this is 0).

§wallet: WalletId

The disposing wallet (CSV wallet column + the box_needs_review source).

§disposition_kind: DisposeKind

The disposition kind (Sell/Spend), for the CSV disposition_kind column.

Trait Implementations§

Source§

impl Clone for Form8949Row

Source§

fn clone(&self) -> Form8949Row

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Form8949Row

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Form8949Row

Source§

impl PartialEq for Form8949Row

Source§

fn eq(&self, other: &Form8949Row) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Form8949Row

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.