Enum sapio_miniscript::miniscript::types::ErrorKind
source · [−]pub enum ErrorKind {
Show 17 variants
InvalidTime,
NonZeroDupIf,
ZeroThreshold,
OverThreshold(usize, usize),
NoStrongChild,
LeftNotDissatisfiable,
RightNotDissatisfiable,
SwapNonOne,
NonZeroZero,
LeftNotUnit,
ChildBase1(Base),
ChildBase2(Base, Base),
ChildBase3(Base, Base, Base),
ThresholdBase(usize, Base),
ThresholdDissat(usize),
ThresholdNonUnit(usize),
ThresholdNotStrong {
k: usize,
n: usize,
n_strong: usize,
},
}
Expand description
Detailed type of a typechecker error
Variants
InvalidTime
Relative or absolute timelock had an invalid time value (either 0, or >=0x80000000)
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(usize, usize)
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(Base, Base)
Attempted to construct a conjunction or disjunction, but the fragments’ children were of invalid types
ChildBase3(Base, Base, Base)
Attempted to construct an andor
but the fragments’
children were of invalid types
ThresholdBase(usize, Base)
The nth child of a threshold fragment had an invalid type (the
first must be B
and the rest W
s)
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
Fields
k: usize
Threshold parameter
n: usize
Number of children
n_strong: usize
Number of strong children
Insufficiently many children of a threshold fragment were strong
Trait Implementations
sourceimpl Ord for ErrorKind
impl Ord for ErrorKind
sourceimpl PartialOrd<ErrorKind> for ErrorKind
impl PartialOrd<ErrorKind> for ErrorKind
sourcefn partial_cmp(&self, other: &ErrorKind) -> Option<Ordering>
fn partial_cmp(&self, other: &ErrorKind) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralEq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more