Struct miniscript::miniscript::Miniscript
source · pub struct Miniscript<P>(_);
Expand description
Top-level script AST type
Implementations
sourceimpl Miniscript<PublicKey>
impl Miniscript<PublicKey>
sourceimpl<P> Miniscript<P>
impl<P> Miniscript<P>
sourceimpl<P: ToString> Miniscript<P>
impl<P: ToString> Miniscript<P>
sourcepub fn satisfy<F, H>(
&self,
keyfn: Option<&F>,
hashfn: Option<&H>,
age: u32
) -> Result<Vec<Vec<u8>>, Error>where
F: Fn(&P) -> Option<(Signature, Option<SigHashType>)>,
H: Fn(Sha256dHash) -> Option<[u8; 32]>,
pub fn satisfy<F, H>(
&self,
keyfn: Option<&F>,
hashfn: Option<&H>,
age: u32
) -> Result<Vec<Vec<u8>>, Error>where
F: Fn(&P) -> Option<(Signature, Option<SigHashType>)>,
H: Fn(Sha256dHash) -> Option<[u8; 32]>,
Attempt to produce a satisfying witness for the scriptpubkey represented by the parse tree
sourceimpl<P: Clone> Miniscript<P>
impl<P: Clone> Miniscript<P>
sourcepub fn public_keys(&self) -> Vec<P>
pub fn public_keys(&self) -> Vec<P>
Return a list of all public keys which might contribute to satisfaction of the scriptpubkey
Trait Implementations
sourceimpl<P: Clone> Clone for Miniscript<P>
impl<P: Clone> Clone for Miniscript<P>
sourcefn clone(&self) -> Miniscript<P>
fn clone(&self) -> Miniscript<P>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<P: Debug> Debug for Miniscript<P>
impl<P: Debug> Debug for Miniscript<P>
sourceimpl<P: Display> Display for Miniscript<P>
impl<P: Display> Display for Miniscript<P>
sourceimpl<P> From<T<P>> for Miniscript<P>
impl<P> From<T<P>> for Miniscript<P>
sourcefn from(t: T<P>) -> Miniscript<P>
fn from(t: T<P>) -> Miniscript<P>
Converts to this type from the input type.
sourceimpl<P: Ord> Ord for Miniscript<P>
impl<P: Ord> Ord for Miniscript<P>
sourcefn cmp(&self, other: &Miniscript<P>) -> Ordering
fn cmp(&self, other: &Miniscript<P>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<P: PartialEq> PartialEq<Miniscript<P>> for Miniscript<P>
impl<P: PartialEq> PartialEq<Miniscript<P>> for Miniscript<P>
sourcefn eq(&self, other: &Miniscript<P>) -> bool
fn eq(&self, other: &Miniscript<P>) -> bool
sourceimpl<P: PartialOrd> PartialOrd<Miniscript<P>> for Miniscript<P>
impl<P: PartialOrd> PartialOrd<Miniscript<P>> for Miniscript<P>
sourcefn partial_cmp(&self, other: &Miniscript<P>) -> Option<Ordering>
fn partial_cmp(&self, other: &Miniscript<P>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<P: Eq> Eq for Miniscript<P>
impl<P> StructuralEq for Miniscript<P>
impl<P> StructuralPartialEq for Miniscript<P>
Auto Trait Implementations
impl<P> RefUnwindSafe for Miniscript<P>where
P: RefUnwindSafe,
impl<P> !Send for Miniscript<P>
impl<P> !Sync for Miniscript<P>
impl<P> Unpin for Miniscript<P>where
P: Unpin,
impl<P> UnwindSafe for Miniscript<P>where
P: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more