pub struct ExtData {
    pub pk_cost: usize,
    pub has_free_verify: bool,
    pub ops: OpLimits,
    pub stack_elem_count_sat: Option<usize>,
    pub stack_elem_count_dissat: Option<usize>,
    pub max_sat_size: Option<(usize, usize)>,
    pub max_dissat_size: Option<(usize, usize)>,
    pub timelock_info: TimelockInfo,
    pub exec_stack_elem_count_sat: Option<usize>,
    pub exec_stack_elem_count_dissat: Option<usize>,
}
Expand description

Structure representing the extra type properties of a fragment.

Fields

pk_cost: usize

The number of bytes needed to encode its scriptpubkey

has_free_verify: bool

Whether this fragment can be verify-wrapped for free

ops: OpLimits

Opcode limits for this fragment.

stack_elem_count_sat: Option<usize>

The worst case number of stack elements for satisfying this Miniscript fragment.

stack_elem_count_dissat: Option<usize>

The worst case number of stack elements for dissatisfying this Miniscript fragment.

max_sat_size: Option<(usize, usize)>

Maximum size, in bytes, of a satisfying witness. First elements is the cost for the witness stack, the second one is the cost for scriptSig. All signatures are assumed to be 73 bytes in size, including the length prefix (segwit) or push opcode (pre-segwit) and sighash postfix.

max_dissat_size: Option<(usize, usize)>

Maximum dissatisfaction cost, in bytes, of a Miniscript fragment. First elements is the cost for the witness stack, the second one is the cost for scriptSig.

timelock_info: TimelockInfo

The timelock info about heightlocks and timelocks

exec_stack_elem_count_sat: Option<usize>

Maximum stack + alt stack size during satisfaction execution This does not include initial witness elements. This element only captures the additional elements that are pushed during execution.

exec_stack_elem_count_dissat: Option<usize>

Maximum stack + alt stack size during dissat execution This does not include initial witness elements. This element only captures the additional elements that are pushed during execution.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Compute the type of a fragment assuming all the children of Miniscript have been computed already.

Any extra sanity checks/assertions that should be applied after typechecking Read more
Type property of the True fragment
Type property of the False fragment
Type property of the PkK fragment
Type property of the PkH fragment
Type property of a Multi fragment
Type property of a MultiA fragment
Type property of a hash fragment
Type property of a Sha256 hash. Default implementation simply passes through to from_hash Read more
Type property of a Hash256 hash. Default implementation simply passes through to from_hash Read more
Type property of a Ripemd160 hash. Default implementation simply passes through to from_hash Read more
Type property of a Hash160 hash. Default implementation simply passes through to from_hash Read more
Type property of a timelock
Type property of an absolute timelock. Default implementation simply passes through to from_time Read more
Type property of a relative timelock. Default implementation simply passes through to from_time Read more
Cast using the Alt wrapper
Cast using the Swap wrapper
Cast using the Check wrapper
Cast using the DupIf wrapper
Cast using the Verify wrapper
Cast using the NonZero wrapper
Cast using the ZeroNotEqual wrapper
Cast by changing [X] to or_i([X], 0) or or_i(0, [X])
Computes the type of an AndB fragment
Computes the type of an AndV fragment
Computes the type of an OrB fragment
Computes the type of an OrD fragment
Computes the type of an OrC fragment
Computes the type of an OrI fragment
Computes the type of an AndOr fragment
Computes the type of an Thresh fragment
Cast by changing [X] to AndV([X], True)
Cast by changing [X] to or_i([X], 0). Default implementation simply passes through to cast_or_i_false Read more
Cast by changing [X] to or_i(0, [X]). Default implementation simply passes through to cast_or_i_false Read more
Computes the type of an AndN fragment

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.