[][src]Struct miniscript::SatisfiedConstraints

pub struct SatisfiedConstraints<'desc, 'stack, F: FnMut(&PublicKey, BitcoinSig) -> bool> { /* fields omitted */ }

An iterator over all the satisfied constraints satisfied by a given descriptor/scriptSig/witness stack tuple. This returns all the redundant satisfied constraints even if they were not required for the entire satisfaction. For example, and_b(Pk,false) would return the witness for Pk if it was satisfied even if the entire and_b could have failed. In case the script would abort on the given witness stack OR if the entire script is dissatisfied, this would return keep on returning values _until_Error.

Implementations

impl<'desc, 'stack, F> SatisfiedConstraints<'desc, 'stack, F> where
    F: FnMut(&PublicKey, BitcoinSig) -> bool
[src]

pub fn from_descriptor(
    des: &'desc Descriptor<PublicKey>,
    stack: Stack<'stack>,
    verify_sig: F,
    age: u32,
    height: u32
) -> SatisfiedConstraints<'desc, 'stack, F>

Notable traits for SatisfiedConstraints<'desc, 'stack, F>

impl<'desc, 'stack, F> Iterator for SatisfiedConstraints<'desc, 'stack, F> where
    Any: ScriptContext,
    F: FnMut(&PublicKey, BitcoinSig) -> bool
type Item = Result<SatisfiedConstraint<'desc, 'stack>, Error>;
[src]

descriptor by a given witness stack. Because this iterator is lazy, it may return satisfied constraints even if these turn out to be irrelevant to the final (dis)satisfaction of the descriptor.

Trait Implementations

impl<'desc, 'stack, F> Iterator for SatisfiedConstraints<'desc, 'stack, F> where
    Any: ScriptContext,
    F: FnMut(&PublicKey, BitcoinSig) -> bool
[src]

Iterator for SatisfiedConstraints

type Item = Result<SatisfiedConstraint<'desc, 'stack>, Error>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'desc, 'stack, F> RefUnwindSafe for SatisfiedConstraints<'desc, 'stack, F> where
    F: RefUnwindSafe

impl<'desc, 'stack, F> Send for SatisfiedConstraints<'desc, 'stack, F> where
    F: Send

impl<'desc, 'stack, F> Sync for SatisfiedConstraints<'desc, 'stack, F> where
    F: Sync

impl<'desc, 'stack, F> Unpin for SatisfiedConstraints<'desc, 'stack, F> where
    F: Unpin

impl<'desc, 'stack, F> UnwindSafe for SatisfiedConstraints<'desc, 'stack, F> where
    F: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.