Trait TranslatePk

Source
pub trait TranslatePk<P, Q>{
    type Output;

    // Required method
    fn translate_pk<T, E>(
        &self,
        translator: &mut T,
    ) -> Result<Self::Output, TranslateErr<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, TranslateErr<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.

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.

Implementors§

Source§

impl<P, Q> TranslatePk<P, Q> for Descriptor<P>

Source§

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

Source§

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

Source§

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

Source§

type Output = Sh<Q>

Source§

impl<P, Q> TranslatePk<P, Q> for Tr<P>

Source§

type Output = Tr<Q>

Source§

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

Source§

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

Source§

impl<Pk, Q, Ctx> TranslatePk<Pk, Q> for Miniscript<Pk, Ctx>

Source§

type Output = Miniscript<Q, Ctx>