Trait elements_miniscript::ForEachKey [−][src]
pub trait ForEachKey<Pk> where
Pk: MiniscriptKey, { fn for_each_key<'a, F>(&'a self, pred: F) -> bool
where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a; fn for_any_key<'a, F>(&'a self, pred: F) -> bool
where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a, { ... } }
Expand description
Trait describing the ability to iterate over every key
Required methods
fn for_each_key<'a, F>(&'a self, pred: F) -> bool where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a,
fn for_each_key<'a, F>(&'a self, pred: F) -> bool where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a,
Run a predicate on every key in the descriptor, returning whether the predicate returned true for every key
Provided methods
fn for_any_key<'a, F>(&'a self, pred: F) -> bool where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a,
fn for_any_key<'a, F>(&'a self, pred: F) -> bool where
Pk: 'a,
F: FnMut(ForEach<'a, Pk>) -> bool,
<Pk as MiniscriptKey>::Hash: 'a,
Run a predicate on every key in the descriptor, returning whether the predicate returned true for any key