Skip to main content

Kind

Enum Kind 

Source
pub enum Kind {
Show 24 variants BadVersion, BadVarint, Truncated, BadFlag, TreeHeightOver64, TreeHeightZero, OffsetOutsideTree, NoTxidAtLevelZero, MissingSibling, MismatchedNode, RootNotCarried, BumpIndexNamesNoBump, TxidNotInBump, InputNamesNoElement, StubNotProven, TrailingBytes, SubjectMissing, UnrelatedTransaction, NoInputs, NoOutputs, UnprovenCoinbase, NullOutpoint, DuplicateInput, ValueOutOfRange,
}
Expand description

The twenty-four kinds of refusal, the Lean’s Kind. None is a size or a count: no byte is wrong by being one of many.

Variants§

§

BadVersion

The version word is neither 0100BEEF nor 0200BEEF.

§

BadVarint

A varint cut short or encoded non-canonically.

§

Truncated

A fixed-width field cut short.

§

BadFlag

A flag byte outside its table.

§

TreeHeightOver64

A BUMP’s tree-height byte over 64.

§

TreeHeightZero

A BUMP’s tree-height byte 0.

§

OffsetOutsideTree

A leaf’s offset at or beyond the width of its level.

§

NoTxidAtLevelZero

A BUMP whose level 0 carries no hash.

§

MissingSibling

A path needs a node the BUMP neither carries nor determines.

§

MismatchedNode

A node the level below determines differs from the one carried.

§

RootNotCarried

A BUMP’s root is not the root the headers carry at its height.

§

BumpIndexNamesNoBump

A transaction’s BUMP index names no BUMP.

§

TxidNotInBump

A transaction’s BUMP does not carry its txid at level 0.

§

InputNamesNoElement

An input of an unproven transaction names no earlier transaction.

§

StubNotProven

A txid-only entry no BUMP proves.

§

TrailingBytes

A byte after the frame’s end.

§

SubjectMissing

Atomic: the subject is not the last transaction.

§

UnrelatedTransaction

Atomic: a transaction that is not the subject and that nothing spends.

§

NoInputs

A raw transaction with no input (since 0.4.1).

§

NoOutputs

A raw transaction with an input and no output (since 0.4.3).

§

UnprovenCoinbase

An unproven single null-outpoint input, at the transaction’s leading byte. [SRC] sibling@87f0461 TxRules.lean:35-38,102 (#68).

§

NullOutpoint

A null outpoint in a regular transaction, at the input’s previous txid. [SRC] sibling@87f0461 TxRules.lean:31-32,107 (#68).

§

DuplicateInput

A repeated outpoint, at the repeating input’s previous txid. [SRC] sibling@87f0461 TxRules.lean:108 (#68).

§

ValueOutOfRange

An output value or running total outside MoneyRange, at the value field. [SRC] sibling@87f0461 TxRules.lean:25,88-93 (#68).

Implementations§

Source§

impl Kind

Source

pub const ALL: [Kind; 24]

The twenty-four kinds, each once, in the Lean’s order (Kind.all).

Trait Implementations§

Source§

impl Clone for Kind

Source§

fn clone(&self) -> Kind

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 Kind

Source§

impl Debug for Kind

Source§

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

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

impl Eq for Kind

Source§

impl Hash for Kind

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Kind

Source§

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

Auto Trait Implementations§

§

impl Freeze for Kind

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnsafeUnpin for Kind

§

impl UnwindSafe for Kind

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more