pub enum Placeholder<Pk: MiniscriptKey> {
Show 15 variants Pubkey(Pk, usize), PubkeyHash(Hash, usize), EcdsaSigPk(Pk), EcdsaSigPkHash(Hash), SchnorrSigPk(Pk, SchnorrSigType, usize), SchnorrSigPkHash(Hash, TapLeafHash, usize), Sha256Preimage(Pk::Sha256), Hash256Preimage(Pk::Hash256), Ripemd160Preimage(Pk::Ripemd160), Hash160Preimage(Pk::Hash160), HashDissatisfaction, PushOne, PushZero, TapScript(ScriptBuf), TapControlBlock(ControlBlock),
}
Expand description

Placeholder for some data in a Plan

Variants§

§

Pubkey(Pk, usize)

Public key and its size

§

PubkeyHash(Hash, usize)

Public key hash and public key size

§

EcdsaSigPk(Pk)

ECDSA signature given the raw pubkey

§

EcdsaSigPkHash(Hash)

ECDSA signature given the pubkey hash

§

SchnorrSigPk(Pk, SchnorrSigType, usize)

Schnorr signature and its size

§

SchnorrSigPkHash(Hash, TapLeafHash, usize)

Schnorr signature given the pubkey hash, the tapleafhash, and the sig size

§

Sha256Preimage(Pk::Sha256)

SHA-256 preimage

§

Hash256Preimage(Pk::Hash256)

HASH256 preimage

§

Ripemd160Preimage(Pk::Ripemd160)

RIPEMD160 preimage

§

Hash160Preimage(Pk::Hash160)

HASH160 preimage

§

HashDissatisfaction

Hash dissatisfaction (32 bytes of 0x00)

§

PushOne

OP_1

§

PushZero

<empty item>

§

TapScript(ScriptBuf)

Taproot leaf script

§

TapControlBlock(ControlBlock)

Taproot control block

Implementations§

source§

impl<Pk: MiniscriptKey + ToPublicKey> Placeholder<Pk>

source

pub fn satisfy_self<Sat: Satisfier<Pk>>(&self, sat: &Sat) -> Option<Vec<u8>>

Replaces the placeholders with the information given by the satisfier

Trait Implementations§

source§

impl<Pk: Clone + MiniscriptKey> Clone for Placeholder<Pk>
where Pk::Sha256: Clone, Pk::Hash256: Clone, Pk::Ripemd160: Clone, Pk::Hash160: Clone,

source§

fn clone(&self) -> Placeholder<Pk>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Pk: Debug + MiniscriptKey> Debug for Placeholder<Pk>
where Pk::Sha256: Debug, Pk::Hash256: Debug, Pk::Ripemd160: Debug, Pk::Hash160: Debug,

source§

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

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

impl<Pk: MiniscriptKey> Display for Placeholder<Pk>

source§

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

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

impl<Pk: PartialEq + MiniscriptKey> PartialEq for Placeholder<Pk>

source§

fn eq(&self, other: &Placeholder<Pk>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Pk: Eq + MiniscriptKey> Eq for Placeholder<Pk>
where Pk::Sha256: Eq, Pk::Hash256: Eq, Pk::Ripemd160: Eq, Pk::Hash160: Eq,

source§

impl<Pk: MiniscriptKey> StructuralEq for Placeholder<Pk>

source§

impl<Pk: MiniscriptKey> StructuralPartialEq for Placeholder<Pk>

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

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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

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

§

fn vzip(self) -> V