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