pub trait Descriptor<K = XpubDerivable, V = ()>: DeriveScripts {
    type KeyIter<'k>: Iterator<Item = &'k K>
       where Self: 'k,
             K: 'k;
    type VarIter<'v>: Iterator<Item = &'v V>
       where Self: 'v,
             V: 'v;
    type XpubIter<'x>: Iterator<Item = &'x XpubSpec>
       where Self: 'x;

    // Required methods
    fn class(&self) -> SpkClass;
    fn keys(&self) -> Self::KeyIter<'_>;
    fn vars(&self) -> Self::VarIter<'_>;
    fn xpubs(&self) -> Self::XpubIter<'_>;
    fn compr_keyset(
        &self,
        terminal: Terminal
    ) -> IndexMap<CompressedPk, KeyOrigin>;
    fn xonly_keyset(
        &self,
        terminal: Terminal
    ) -> IndexMap<XOnlyPk, TapDerivation>;
}

Required Associated Types§

source

type KeyIter<'k>: Iterator<Item = &'k K> where Self: 'k, K: 'k

source

type VarIter<'v>: Iterator<Item = &'v V> where Self: 'v, V: 'v

source

type XpubIter<'x>: Iterator<Item = &'x XpubSpec> where Self: 'x

Required Methods§

source

fn class(&self) -> SpkClass

source

fn keys(&self) -> Self::KeyIter<'_>

source

fn vars(&self) -> Self::VarIter<'_>

source

fn xpubs(&self) -> Self::XpubIter<'_>

source

fn compr_keyset(&self, terminal: Terminal) -> IndexMap<CompressedPk, KeyOrigin>

source

fn xonly_keyset(&self, terminal: Terminal) -> IndexMap<XOnlyPk, TapDerivation>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K: DeriveCompr> Descriptor<K> for Wpkh<K>

§

type KeyIter<'k> = Once<&'k K> where Self: 'k, K: 'k

§

type VarIter<'v> = Empty<&'v ()> where Self: 'v, (): 'v

§

type XpubIter<'x> = Once<&'x XpubSpec> where Self: 'x

source§

impl<K: DeriveSet<Compr = K, XOnly = K> + DeriveCompr + DeriveXOnly> Descriptor<K> for StdDescr<K>
where Self: Derive<DerivedScript>,

§

type KeyIter<'k> = IntoIter<&'k K> where Self: 'k, K: 'k

§

type VarIter<'v> = Empty<&'v ()> where Self: 'v, (): 'v

§

type XpubIter<'x> = IntoIter<&'x XpubSpec> where Self: 'x

source§

impl<K: DeriveXOnly> Descriptor<K> for TrKey<K>

§

type KeyIter<'k> = Once<&'k K> where Self: 'k, K: 'k

§

type VarIter<'v> = Empty<&'v ()> where Self: 'v, (): 'v

§

type XpubIter<'x> = Once<&'x XpubSpec> where Self: 'x