pub trait TranslatePk<P, Q>where
    P: MiniscriptKey,
    Q: MiniscriptKey,{
    type Output;

    // Required method
    fn translate_pk<T, E>(&self, translator: &mut T) -> Result<Self::Output, E>
       where T: Translator<P, Q, E>;
}
Expand description

Converts a descriptor using abstract keys to one using specific keys. Uses translator t to do the actual translation function calls.

Required Associated Types§

source

type Output

The associated output type. This must be Self<Q>.

Required Methods§

source

fn translate_pk<T, E>(&self, translator: &mut T) -> Result<Self::Output, E>where T: Translator<P, Q, E>,

Translates a struct from one generic to another where the translations for Pk are provided by the given Translator.

Implementors§

source§

impl<P, Q, Ext> TranslatePk<P, Q> for Descriptor<P, Ext>where P: MiniscriptKey, Q: MiniscriptKey, Ext: Extension,

§

type Output = Descriptor<Q, Ext>

source§

impl<P, Q, Ext> TranslatePk<P, Q> for LegacyCSFSCov<P, Ext>where P: MiniscriptKey, Q: MiniscriptKey, Ext: Extension,

§

type Output = LegacyCSFSCov<Q, Ext>

source§

impl<P, Q, Ext> TranslatePk<P, Q> for Tr<P, Ext>where P: MiniscriptKey, Q: MiniscriptKey, Ext: Extension,

§

type Output = Tr<Q, Ext>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Bare<P>

§

type Output = Bare<Q>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Blinded<P>

§

type Output = Blinded<Q>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Pkh<P>

§

type Output = Pkh<Q>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Sh<P>

§

type Output = Sh<Q>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Wpkh<P>

§

type Output = Wpkh<Q>

source§

impl<P: MiniscriptKey, Q: MiniscriptKey> TranslatePk<P, Q> for Wsh<P>

§

type Output = Wsh<Q>

source§

impl<Pk, Q, Ctx, Ext> TranslatePk<Pk, Q> for Terminal<Pk, Ctx, Ext>where Pk: MiniscriptKey, Q: MiniscriptKey, Ctx: ScriptContext, Ext: Extension,

§

type Output = Terminal<Q, Ctx, Ext>

source§

impl<Pk, Q, Ctx, Ext> TranslatePk<Pk, Q> for Miniscript<Pk, Ctx, Ext>where Pk: MiniscriptKey, Q: MiniscriptKey, Ctx: ScriptContext, Ext: Extension,

§

type Output = Miniscript<Q, Ctx, Ext>