#[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 duplicate 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§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>
impl<'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> Freeze for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk, Ext> RefUnwindSafe for TapLeafScript<'a, Pk, Ext>where
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Sha256: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash256: RefUnwindSafe,
<Pk as MiniscriptKey>::Ripemd160: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash160: RefUnwindSafe,
Ext: RefUnwindSafe,
impl<'a, Pk, Ext> Send for TapLeafScript<'a, Pk, Ext>where
Pk: Sync + Send,
<Pk as MiniscriptKey>::Sha256: Sync + Send,
<Pk as MiniscriptKey>::Hash256: Sync + Send,
<Pk as MiniscriptKey>::Ripemd160: Sync + Send,
<Pk as MiniscriptKey>::Hash160: Sync + Send,
Ext: Sync + Send,
impl<'a, Pk, Ext> Sync for TapLeafScript<'a, Pk, Ext>where
Pk: Sync + Send,
<Pk as MiniscriptKey>::Sha256: Sync + Send,
<Pk as MiniscriptKey>::Hash256: Sync + Send,
<Pk as MiniscriptKey>::Ripemd160: Sync + Send,
<Pk as MiniscriptKey>::Hash160: Sync + Send,
Ext: Sync + Send,
impl<'a, Pk, Ext> Unpin for TapLeafScript<'a, Pk, Ext>
impl<'a, Pk, Ext> UnwindSafe for TapLeafScript<'a, Pk, Ext>where
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Sha256: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash256: RefUnwindSafe,
<Pk as MiniscriptKey>::Ripemd160: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash160: RefUnwindSafe,
Ext: 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