pub trait ForEachKey<Pk: MiniscriptKey> {
    // Required method
    fn for_each_key<'a, F: FnMut(ForEach<'a, Pk>) -> bool>(
        &'a self,
        pred: F
    ) -> bool
       where Pk: 'a,
             Pk::Hash: 'a;

    // Provided method
    fn for_any_key<'a, F: FnMut(ForEach<'a, Pk>) -> bool>(
        &'a self,
        pred: F
    ) -> bool
       where Pk: 'a,
             Pk::Hash: 'a { ... }
}
Expand description

Trait describing the ability to iterate over every key

Required Methods§

source

fn for_each_key<'a, F: FnMut(ForEach<'a, Pk>) -> bool>( &'a self, pred: F ) -> bool
where Pk: 'a, Pk::Hash: 'a,

Run a predicate on every key in the descriptor, returning whether the predicate returned true for every key

Provided Methods§

source

fn for_any_key<'a, F: FnMut(ForEach<'a, Pk>) -> bool>(&'a self, pred: F) -> bool
where Pk: 'a, Pk::Hash: 'a,

Run a predicate on every key in the descriptor, returning whether the predicate returned true for any key

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Descriptor<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for sapio_miniscript::policy::concrete::Policy<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for sapio_miniscript::policy::semantic::Policy<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Bare<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Pkh<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Sh<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Tr<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Wpkh<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for Wsh<Pk>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> ForEachKey<Pk> for Terminal<Pk, Ctx>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> ForEachKey<Pk> for SortedMultiVec<Pk, Ctx>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> ForEachKey<Pk> for Miniscript<Pk, Ctx>