Struct wallet::descriptor::ScriptTemplate [−][src]
Allows creating templates for native bitcoin scripts with embedded key generator templates. May be useful for creating descriptors in situations where target script can’t be deterministically represented by miniscript, for instance for Lightning network-specific transaction outputs
Implementations
impl<Pk> ScriptTemplate<Pk> where
Pk: MiniscriptKey + DerivePublicKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + DerivePublicKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
pub fn translate_pk(
&self,
child_index: UnhardenedIndex
) -> ScriptTemplate<PublicKey>[src]
&self,
child_index: UnhardenedIndex
) -> ScriptTemplate<PublicKey>
Trait Implementations
impl<Pk> AsMut<<ScriptTemplate<Pk> as Wrapper>::Inner> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> AsRef<<ScriptTemplate<Pk> as Wrapper>::Inner> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> Borrow<<ScriptTemplate<Pk> as Wrapper>::Inner> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> BorrowMut<<ScriptTemplate<Pk> as Wrapper>::Inner> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn borrow_mut(&mut self) -> &mut Self::Inner[src]
impl<Pk: Clone> Clone for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn clone(&self) -> ScriptTemplate<Pk>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<Pk: Debug> Debug for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> Deref for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
type Target = Self::Inner
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
impl<Pk> DerefMut for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> Display for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk: Eq> Eq for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> From<Vec<OpcodeTemplate<Pk>, Global>> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk: Hash> Hash for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<Pk: Ord> Ord for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn cmp(&self, other: &ScriptTemplate<Pk>) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl<Pk: PartialEq> PartialEq<ScriptTemplate<Pk>> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn eq(&self, other: &ScriptTemplate<Pk>) -> bool[src]
fn ne(&self, other: &ScriptTemplate<Pk>) -> bool[src]
impl<Pk: PartialOrd> PartialOrd<ScriptTemplate<Pk>> for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn partial_cmp(&self, other: &ScriptTemplate<Pk>) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl<Pk> StrictDecode for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>[src]
pub fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>[src]
impl<Pk> StrictEncode for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>[src]
pub fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>[src]
impl<Pk> StructuralEq for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> StructuralPartialEq for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
impl<Pk> Wrapper for ScriptTemplate<Pk> where
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display, [src]
Pk: MiniscriptKey + StrictEncode + StrictDecode + FromStr,
<Pk as FromStr>::Err: Display,
type Inner = Vec<OpcodeTemplate<Pk>>
Inner type wrapped by the current newtype
fn from_inner(inner: Self::Inner) -> Self[src]
fn as_inner(&self) -> &Self::Inner[src]
fn as_inner_mut(&mut self) -> &mut Self::Inner[src]
fn into_inner(self) -> Self::Inner[src]
pub fn to_inner(&self) -> Self::Inner[src]
pub fn copy(&self) -> Self where
Self::Inner: Copy, [src]
Self::Inner: Copy,
Auto Trait Implementations
impl<Pk> RefUnwindSafe for ScriptTemplate<Pk> where
Pk: RefUnwindSafe,
Pk: RefUnwindSafe,
impl<Pk> Send for ScriptTemplate<Pk> where
Pk: Send,
Pk: Send,
impl<Pk> Sync for ScriptTemplate<Pk> where
Pk: Sync,
Pk: Sync,
impl<Pk> Unpin for ScriptTemplate<Pk> where
Pk: Unpin,
Pk: Unpin,
impl<Pk> UnwindSafe for ScriptTemplate<Pk> where
Pk: UnwindSafe,
Pk: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,