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> TranslatePk<P, Q> for Descriptor<P>where P: MiniscriptKey, Q: MiniscriptKey,

source§

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

§

type Output = Bare<Q>

source§

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

§

type Output = Pkh<Q>

source§

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

§

type Output = Sh<Q>

source§

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

§

type Output = Tr<Q>

source§

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

§

type Output = Wpkh<Q>

source§

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

§

type Output = Wsh<Q>

source§

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

§

type Output = Terminal<Q, Ctx>

source§

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

§

type Output = Miniscript<Q, Ctx>