Enum sapio_miniscript::miniscript::types::ErrorKind[][src]

pub enum ErrorKind {
    ZeroTime,
    NonZeroDupIf,
    ZeroThreshold,
    OverThreshold(usizeusize),
    NoStrongChild,
    LeftNotDissatisfiable,
    RightNotDissatisfiable,
    SwapNonOne,
    NonZeroZero,
    LeftNotUnit,
    ChildBase1(Base),
    ChildBase2(BaseBase),
    ChildBase3(BaseBaseBase),
    ThresholdBase(usizeBase),
    ThresholdDissat(usize),
    ThresholdNonUnit(usize),
    ThresholdNotStrong {
        k: usize,
        n: usize,
        n_strong: usize,
    },
}

Detailed type of a typechecker error

Variants

ZeroTime

Relative or absolute timelock had a time value of 0

NonZeroDupIf

Passed a z argument to a d wrapper when z was expected

ZeroThreshold

Multisignature or threshold policy had a k value of 0

OverThreshold(usizeusize)

Multisignature or threshold policy has a k value in excess of the number of subfragments

NoStrongChild

Attempted to construct a disjunction (or andor) for which none of the child nodes were strong. This means that a 3rd party could produce a satisfaction for any branch, meaning that no matter which one an honest signer chooses, it is possible to malleate the transaction.

LeftNotDissatisfiable

Many fragments (all disjunctions except or_i as well as andor require their left child be dissatisfiable.

RightNotDissatisfiable

or_b requires its right child be dissatisfiable

SwapNonOne

Tried to use the s: modifier on a fragment that takes more than one input

NonZeroZero

Tried to use the j: (SIZE 0NOTEQUAL IF) wrapper on something that may be satisfied by a 0 input

LeftNotUnit

Many fragments require their left child to be a unit. This was not the case.

ChildBase1(Base)

Attempted to construct a wrapper, but the child had an invalid type

ChildBase2(BaseBase)

Attempted to construct a conjunction or disjunction, but the fragments’ children were of invalid types

ChildBase3(BaseBaseBase)

Attempted to construct an andor but the fragments’ children were of invalid types

ThresholdBase(usizeBase)

The nth child of a threshold fragment had an invalid type (the first must be B and the rest Ws)

ThresholdDissat(usize)

The nth child of a threshold fragment did not have a unique satisfaction

ThresholdNonUnit(usize)

The nth child of a threshold fragment was not a unit

ThresholdNotStrong

Insufficiently many children of a threshold fragment were strong

Fields of ThresholdNotStrong

k: usize

Threshold parameter

n: usize

Number of children

n_strong: usize

Number of strong children

Trait Implementations

impl Clone for ErrorKind[src]

impl Copy for ErrorKind[src]

impl Debug for ErrorKind[src]

impl Eq for ErrorKind[src]

impl Hash for ErrorKind[src]

impl Ord for ErrorKind[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl PartialOrd<ErrorKind> for ErrorKind[src]

impl StructuralEq for ErrorKind[src]

impl StructuralPartialEq for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.