Skip to main content

ProvenanceKind

Enum ProvenanceKind 

Source
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§

§

Purchase

§

Gift

§

Inheritance

§

Mining

§

Earned

§

Airdrop

§

Fork

Implementations§

Source§

impl ProvenanceKind

Source

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.

Source

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

Source§

fn clone(&self) -> ProvenanceKind

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 Copy for ProvenanceKind

Source§

impl Debug for ProvenanceKind

Source§

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

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

impl Eq for ProvenanceKind

Source§

impl PartialEq for ProvenanceKind

Source§

fn eq(&self, other: &ProvenanceKind) -> 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 ProvenanceKind

Source§

impl ValueEnum for ProvenanceKind

Source§

fn value_variants<'a>() -> &'a [Self]

All possible argument values, in display order.
Source§

fn to_possible_value<'a>(&self) -> Option<PossibleValue>

The canonical argument value. Read more
Source§

fn from_str(input: &str, ignore_case: bool) -> Result<Self, String>

Parse an argument into Self.

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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.
Source§

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

Source§

fn vzip(self) -> V