pub enum ProvenanceKind {
Purchase,
Gift,
Inheritance,
Mining,
Earned,
Airdrop,
Fork,
}Expand description
The units’ real acquisition provenance (BG-D5). A CLOSED enumeration: only Purchase clears the
promote gate — every other value has a documented FMV-at-receipt/carryover basis from the return
(Notice 2014-21; Rev. Rul. 2019-24) and is refused, pointed at modeling the real acquisition instead.
CLI-facing only (not part of the persisted schema — only provenance_attested: bool plus the fixed
PROVENANCE_TEXT/PROVENANCE_VERSION are stored on the event, per T1’s Acknowledgment).
Variants§
Implementations§
Source§impl ProvenanceKind
impl ProvenanceKind
Sourcepub const ALL: &[ProvenanceKind]
pub const ALL: &[ProvenanceKind]
The CLOSED enumeration, in --provenance declaration order — the SINGLE list a driver offers the
filer to choose from. Added for the TUI Promote flow’s BG-D5 provenance step (P-C gate tax I-2):
the wizard must make the filer SELECT their acquisition provenance exactly as --provenance makes
the CLI filer select it, and btctax-tui-edit does not depend on clap, so it cannot reach
ValueEnum::value_variants(). Kept in lock-step with the enum by
tests::provenance_all_covers_every_clap_value_variant.
★ A slice, not a fixed-length array (whole-branch arch Nit-N1, narrowed before the first
publish): [ProvenanceKind; 7] bakes the variant COUNT into the public type, so adding a
provenance kind would be a breaking change for every downstream matcher. As a slice that addition
is purely additive.
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
The filer-facing label for one variant. pub (widened from pub(crate) for the TUI Promote
flow’s BG-D5 step): the chokepoint (crate::chokepoint::refuse_non_purchase) builds its refusal
copy from this, so a driver offering the enumeration renders the SAME words the refusal names —
no second copy of the enumeration’s wording.
Trait Implementations§
Source§impl Clone for ProvenanceKind
impl Clone for ProvenanceKind
Source§fn clone(&self) -> ProvenanceKind
fn clone(&self) -> ProvenanceKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProvenanceKind
Source§impl Debug for ProvenanceKind
impl Debug for ProvenanceKind
impl Eq for ProvenanceKind
Source§impl PartialEq for ProvenanceKind
impl PartialEq for ProvenanceKind
impl StructuralPartialEq for ProvenanceKind
Source§impl ValueEnum for ProvenanceKind
impl ValueEnum for ProvenanceKind
Auto Trait Implementations§
impl Freeze for ProvenanceKind
impl RefUnwindSafe for ProvenanceKind
impl Send for ProvenanceKind
impl Sync for ProvenanceKind
impl Unpin for ProvenanceKind
impl UnsafeUnpin for ProvenanceKind
impl UnwindSafe for ProvenanceKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.