Trait elements_miniscript::TranslatePk1 [−][src]
pub trait TranslatePk1<P, Q>: TranslatePk<P, Q> where
P: MiniscriptKey,
Q: MiniscriptKey<Hash = <P as MiniscriptKey>::Hash>, { fn translate_pk1<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<Self::Output, E>
where
Fpk: FnMut(&P) -> Result<Q, E>, { ... } fn translate_pk1_infallible<Fpk>(&self, translatefpk: Fpk) -> Self::Output
where
Fpk: FnMut(&P) -> Q, { ... } }
Expand description
Variant of TranslatePk
where P and Q both have the same hash
type, and the hashes can be converted by just cloning them
Provided methods
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk
fn translate_pk1_infallible<Fpk>(&self, translatefpk: Fpk) -> Self::Output where
Fpk: FnMut(&P) -> Q,
fn translate_pk1_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