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

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

Either a key or keyhash, but both contain Pk Trait describing the ability to iterate over every key

Required Methods§

source

fn for_each_key<'a, F: FnMut(&'a Pk) -> bool>(&'a self, pred: F) -> bool
where Pk: '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(&'a Pk) -> bool>(&'a self, pred: F) -> bool
where Pk: '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 miniscript::policy::concrete::Policy<Pk>

source§

impl<Pk: MiniscriptKey> ForEachKey<Pk> for 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 SortedMultiVec<Pk, Ctx>

source§

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