pub trait TranslatePk3<P: MiniscriptKey + ToPublicKey, Q: MiniscriptKey<Hash = Hash>>: TranslatePk<P, Q> {
// Provided methods
fn translate_pk3<Fpk, E>(
&self,
translatefpk: Fpk,
) -> Result<<Self as TranslatePk<P, Q>>::Output, E>
where Fpk: FnMut(&P) -> Result<Q, E> { ... }
fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk,
) -> <Self as TranslatePk<P, Q>>::Output { ... }
}Expand description
Variant of TranslatePk where Q’s hash is hash160 so we can
derive hashes by calling hash_to_hash160
Provided Methods§
Sourcefn translate_pk3<Fpk, E>(
&self,
translatefpk: Fpk,
) -> Result<<Self as TranslatePk<P, Q>>::Output, E>
fn translate_pk3<Fpk, E>( &self, translatefpk: Fpk, ) -> Result<<Self as TranslatePk<P, Q>>::Output, E>
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk
Sourcefn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk,
) -> <Self as TranslatePk<P, Q>>::Output
fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>( &self, translatefpk: Fpk, ) -> <Self as TranslatePk<P, Q>>::Output
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk
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.