pub trait TranslatePk2<P: MiniscriptKey<Hash = P>, Q: MiniscriptKey>: TranslatePk<P, Q> {
    fn translate_pk2<Fpk: Fn(&P) -> Result<Q, E>, E>(
        &self,
        translatefpk: Fpk
    ) -> Result<<Self as TranslatePk<P, Q>>::Output, E> { ... } fn translate_pk2_infallible<Fpk: Fn(&P) -> Q>(
        &self,
        translatefpk: Fpk
    ) -> <Self as TranslatePk<P, Q>>::Output { ... } }
Expand description

Variant of TranslatePk where P’s hash is P, so the hashes can be converted by reusing the key-conversion function

Provided Methods

Translate a struct from one generic to another where the translation for Pk is provided by translatefpk

Translate a struct from one generic to another where the translation for Pk is provided by translatefpk

Implementors