pub struct CandidateDisposal {
pub existing_event: Option<EventId>,
pub wallet: WalletId,
pub date: TaxDate,
pub sat: Sat,
pub kind: DisposeKind,
pub proceeds: Option<Usd>,
}Expand description
A candidate disposal to be evaluated (without persisting anything).
existing_event = Some(id)— re-score an event already in the ledger with a candidate selection. The event’s own proceeds AND its resolved principal sat are used; bothproceedsandsaton the candidate are ignored (M2: an injected selection is validated against the event’s resolved principal, so a wrongcandidate.satcannot mis-score).existing_event = None— a synthetic/hypothetical disposal (Mode-2 consultation). The engine appends a temporaryOp::Disposewith the givenproceeds(or FMV from the dataset whenproceedsisNone), folds, and discards the result.
Fields§
§existing_event: Option<EventId>Some(id) → score an existing disposal; None → synthetic (Mode-2).
wallet: WalletId§date: TaxDate§sat: Sat§kind: DisposeKind§proceeds: Option<Usd>Explicit proceeds (wins over FMV). Required for synthetic disposals on dates with no
price entry — evaluate_disposal returns Err(ProceedsRequired) when both this and
the dataset FMV are absent.
Trait Implementations§
Source§impl Clone for CandidateDisposal
impl Clone for CandidateDisposal
Source§fn clone(&self) -> CandidateDisposal
fn clone(&self) -> CandidateDisposal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CandidateDisposal
impl RefUnwindSafe for CandidateDisposal
impl Send for CandidateDisposal
impl Sync for CandidateDisposal
impl Unpin for CandidateDisposal
impl UnsafeUnpin for CandidateDisposal
impl UnwindSafe for CandidateDisposal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more