Trait elements_miniscript::TranslatePk2 [−][src]
pub trait TranslatePk2<P, Q>: TranslatePk<P, Q> where
P: MiniscriptKey<Hash = P>,
Q: MiniscriptKey, { fn translate_pk2<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<Self::Output, E>
where
Fpk: Fn(&P) -> Result<Q, E>, { ... } fn translate_pk2_infallible<Fpk>(&self, translatefpk: Fpk) -> Self::Output
where
Fpk: Fn(&P) -> Q, { ... } }
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
fn translate_pk2_infallible<Fpk>(&self, translatefpk: Fpk) -> Self::Output where
Fpk: Fn(&P) -> Q,
fn translate_pk2_infallible<Fpk>(&self, translatefpk: Fpk) -> Self::Output where
Fpk: Fn(&P) -> Q,
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk