[][src]Trait miniscript::TranslatePk2

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::Output, E> { ... }
fn translate_pk2_infallible<Fpk: Fn(&P) -> Q>(
        &self,
        translatefpk: Fpk
    ) -> Self::Output { ... } }

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

Provided methods

fn translate_pk2<Fpk: Fn(&P) -> Result<Q, E>, E>(
    &self,
    translatefpk: Fpk
) -> Result<Self::Output, E>
[src]

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

fn translate_pk2_infallible<Fpk: Fn(&P) -> Q>(
    &self,
    translatefpk: Fpk
) -> Self::Output
[src]

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

Loading content...

Implementors

impl<P: MiniscriptKey<Hash = P>, Q: MiniscriptKey, T: TranslatePk<P, Q>> TranslatePk2<P, Q> for T[src]

Loading content...