pub trait Descriptor<K = XpubDerivable, V = ()>:
DeriveScripts
+ Clone
+ Display {
// Required methods
fn class(&self) -> SpkClass;
fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>
where K: 'a;
fn vars<'a>(&'a self) -> impl Iterator<Item = &'a V>
where V: 'a;
fn xpubs(&self) -> impl Iterator<Item = &XpubAccount>;
fn legacy_keyset(&self, terminal: Terminal) -> IndexMap<LegacyPk, KeyOrigin>;
fn xonly_keyset(
&self,
terminal: Terminal,
) -> IndexMap<XOnlyPk, TapDerivation>;
fn legacy_witness(
&self,
keysigs: HashMap<&KeyOrigin, LegacyKeySig>,
) -> Option<(SigScript, Witness)>;
fn taproot_witness(
&self,
keysigs: HashMap<&KeyOrigin, TaprootKeySig>,
) -> Option<Witness>;
// Provided method
fn is_taproot(&self) -> bool { ... }
}
Required Methods§
fn class(&self) -> SpkClass
fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>where
K: 'a,
fn vars<'a>(&'a self) -> impl Iterator<Item = &'a V>where
V: 'a,
fn xpubs(&self) -> impl Iterator<Item = &XpubAccount>
fn legacy_keyset(&self, terminal: Terminal) -> IndexMap<LegacyPk, KeyOrigin>
fn xonly_keyset(&self, terminal: Terminal) -> IndexMap<XOnlyPk, TapDerivation>
fn legacy_witness( &self, keysigs: HashMap<&KeyOrigin, LegacyKeySig>, ) -> Option<(SigScript, Witness)>
fn taproot_witness( &self, keysigs: HashMap<&KeyOrigin, TaprootKeySig>, ) -> Option<Witness>
Provided Methods§
fn is_taproot(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.