#[non_exhaustive]pub enum TapLeafScript<'a, Pk: MiniscriptKey, Ext: Extension> {
Miniscript(&'a Miniscript<Pk, Tap, Ext>),
}Expand description
Script at a tap leaf.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Miniscript(&'a Miniscript<Pk, Tap, Ext>)
Miniscript leaf
Implementations§
source§impl<'a, Pk: MiniscriptKey, Ext: Extension> TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: MiniscriptKey, Ext: Extension> TapLeafScript<'a, Pk, Ext>
sourcepub fn as_miniscript(&self) -> Option<&'a Miniscript<Pk, Tap, Ext>>
pub fn as_miniscript(&self) -> Option<&'a Miniscript<Pk, Tap, Ext>>
Get the Miniscript at the leaf, if it exists.
sourcepub fn version(&self) -> LeafVersion
pub fn version(&self) -> LeafVersion
Return the version of the leaf.
sourcepub fn script_size(&self) -> usize
pub fn script_size(&self) -> usize
Return the byte size of the encoded leaf script (witness script).
sourcepub fn max_satisfaction_witness_elements(&self) -> Result<usize, Error>
pub fn max_satisfaction_witness_elements(&self) -> Result<usize, Error>
Return the maximum number of witness elements used to satisfied the leaf script, including the witness script itself.
sourcepub fn max_satisfaction_size(&self) -> Result<usize, Error>
pub fn max_satisfaction_size(&self) -> Result<usize, Error>
Return the maximum byte size of a satisfying witness.
source§impl<'a, Pk: ToPublicKey, Ext: ParseableExt> TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: ToPublicKey, Ext: ParseableExt> TapLeafScript<'a, Pk, Ext>
Trait Implementations§
source§impl<'a, Pk: Clone + MiniscriptKey, Ext: Clone + Extension> Clone for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: Clone + MiniscriptKey, Ext: Clone + Extension> Clone for TapLeafScript<'a, Pk, Ext>
source§fn clone(&self) -> TapLeafScript<'a, Pk, Ext>
fn clone(&self) -> TapLeafScript<'a, Pk, Ext>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a, Pk: Debug + MiniscriptKey, Ext: Debug + Extension> Debug for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: Debug + MiniscriptKey, Ext: Debug + Extension> Debug for TapLeafScript<'a, Pk, Ext>
source§impl<'a, Pk: Hash + MiniscriptKey, Ext: Hash + Extension> Hash for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: Hash + MiniscriptKey, Ext: Hash + Extension> Hash for TapLeafScript<'a, Pk, Ext>
source§impl<'a, Pk: Ord + MiniscriptKey, Ext: Ord + Extension> Ord for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: Ord + MiniscriptKey, Ext: Ord + Extension> Ord for TapLeafScript<'a, Pk, Ext>
source§fn cmp(&self, other: &TapLeafScript<'a, Pk, Ext>) -> Ordering
fn cmp(&self, other: &TapLeafScript<'a, Pk, Ext>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a, Pk: PartialEq + MiniscriptKey, Ext: PartialEq + Extension> PartialEq for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: PartialEq + MiniscriptKey, Ext: PartialEq + Extension> PartialEq for TapLeafScript<'a, Pk, Ext>
source§fn eq(&self, other: &TapLeafScript<'a, Pk, Ext>) -> bool
fn eq(&self, other: &TapLeafScript<'a, Pk, Ext>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a, Pk: PartialOrd + MiniscriptKey, Ext: PartialOrd + Extension> PartialOrd for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: PartialOrd + MiniscriptKey, Ext: PartialOrd + Extension> PartialOrd for TapLeafScript<'a, Pk, Ext>
source§fn partial_cmp(&self, other: &TapLeafScript<'a, Pk, Ext>) -> Option<Ordering>
fn partial_cmp(&self, other: &TapLeafScript<'a, Pk, Ext>) -> Option<Ordering>
1.0.0 · source§fn 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 moreimpl<'a, Pk: Copy + MiniscriptKey, Ext: Copy + Extension> Copy for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: Eq + MiniscriptKey, Ext: Eq + Extension> Eq for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk: MiniscriptKey, Ext: Extension> StructuralPartialEq for TapLeafScript<'a, Pk, Ext>
Auto Trait Implementations§
impl<'a, Pk, Ext> RefUnwindSafe for TapLeafScript<'a, Pk, Ext>where
Ext: RefUnwindSafe,
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash160: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash256: RefUnwindSafe,
<Pk as MiniscriptKey>::Ripemd160: RefUnwindSafe,
<Pk as MiniscriptKey>::Sha256: RefUnwindSafe,
impl<'a, Pk, Ext> Send for TapLeafScript<'a, Pk, Ext>where
Ext: Sync + Send,
Pk: Sync + Send,
<Pk as MiniscriptKey>::Hash160: Sync + Send,
<Pk as MiniscriptKey>::Hash256: Sync + Send,
<Pk as MiniscriptKey>::Ripemd160: Sync + Send,
<Pk as MiniscriptKey>::Sha256: Sync + Send,
impl<'a, Pk, Ext> Sync for TapLeafScript<'a, Pk, Ext>where
Ext: Sync + Send,
Pk: Sync + Send,
<Pk as MiniscriptKey>::Hash160: Sync + Send,
<Pk as MiniscriptKey>::Hash256: Sync + Send,
<Pk as MiniscriptKey>::Ripemd160: Sync + Send,
<Pk as MiniscriptKey>::Sha256: Sync + Send,
impl<'a, Pk, Ext> Unpin for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk, Ext> UnwindSafe for TapLeafScript<'a, Pk, Ext>where
Ext: RefUnwindSafe,
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash160: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash256: RefUnwindSafe,
<Pk as MiniscriptKey>::Ripemd160: RefUnwindSafe,
<Pk as MiniscriptKey>::Sha256: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more