#[non_exhaustive]pub enum DerivedScript {
Bare(ScriptPubkey),
Bip13(RedeemScript),
Segwit(WitnessScript),
Nested(WitnessScript),
TaprootKeyOnly(InternalPk),
TaprootScript(InternalPk, TapTree),
}
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.
Bare(ScriptPubkey)
Bip13(RedeemScript)
Segwit(WitnessScript)
Nested(WitnessScript)
TaprootKeyOnly(InternalPk)
TaprootScript(InternalPk, TapTree)
Implementations§
Source§impl DerivedScript
impl DerivedScript
pub fn to_script_pubkey(&self) -> ScriptPubkey
pub fn to_redeem_script(&self) -> Option<RedeemScript>
pub fn as_witness_script(&self) -> Option<&WitnessScript>
pub fn to_witness_script(&self) -> Option<WitnessScript>
pub fn to_internal_pk(&self) -> Option<InternalPk>
pub fn as_tap_tree(&self) -> Option<&TapTree>
pub fn to_tap_tree(&self) -> Option<TapTree>
pub fn to_leaf_scripts(&self) -> IndexMap<ControlBlock, LeafScript>
pub fn to_tap_root(&self) -> Option<TapNodeHash>
Trait Implementations§
Source§impl Clone for DerivedScript
impl Clone for DerivedScript
Source§fn clone(&self) -> DerivedScript
fn clone(&self) -> DerivedScript
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 Debug for DerivedScript
impl Debug for DerivedScript
Source§impl<S> Derive<DerivedScript> for StdDescr<S>where
S: DeriveSet,
impl<S> Derive<DerivedScript> for StdDescr<S>where
S: DeriveSet,
fn default_keychain(&self) -> Keychain
fn keychains(&self) -> BTreeSet<Keychain>
fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = DerivedScript>
fn derive_range( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = D>
Source§impl<K> Derive<DerivedScript> for Tr<K>where
K: DeriveXOnly,
impl<K> Derive<DerivedScript> for Tr<K>where
K: DeriveXOnly,
fn default_keychain(&self) -> Keychain
fn keychains(&self) -> BTreeSet<Keychain>
fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = DerivedScript>
fn derive_range( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = D>
Source§impl<K> Derive<DerivedScript> for TrKey<K>where
K: DeriveXOnly,
impl<K> Derive<DerivedScript> for TrKey<K>where
K: DeriveXOnly,
fn default_keychain(&self) -> Keychain
fn keychains(&self) -> BTreeSet<Keychain>
fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = DerivedScript>
fn derive_range( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = D>
Source§impl<K> Derive<DerivedScript> for Wpkh<K>where
K: DeriveCompr,
impl<K> Derive<DerivedScript> for Wpkh<K>where
K: DeriveCompr,
fn default_keychain(&self) -> Keychain
fn keychains(&self) -> BTreeSet<Keychain>
fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = DerivedScript>
fn derive_range( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = D>
Source§impl Hash for DerivedScript
impl Hash for DerivedScript
Source§impl PartialEq for DerivedScript
impl PartialEq for DerivedScript
impl Eq for DerivedScript
impl StructuralPartialEq for DerivedScript
Auto Trait Implementations§
impl Freeze for DerivedScript
impl RefUnwindSafe for DerivedScript
impl Send for DerivedScript
impl Sync for DerivedScript
impl Unpin for DerivedScript
impl UnwindSafe for DerivedScript
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.