mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Filter calls in utility (#6131)
* Filter calls. * Remove old proxy code * Docs and repot * Update frame/utility/src/tests.rs Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com> * fix test * Grumble * Bump runtime version * fix * Attempt general fix Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com> Co-authored-by: NikVolf <nikvolf@gmail.com>
This commit is contained in:
@@ -33,6 +33,16 @@ use crate::storage::StorageMap;
|
||||
use crate::weights::Weight;
|
||||
use impl_trait_for_tuples::impl_for_tuples;
|
||||
|
||||
/// Simple trait for providing a filter over a reference to some type.
|
||||
pub trait Filter<T> {
|
||||
/// Determine if a given value should be allowed through the filter (returns `true`) or not.
|
||||
fn filter(_: &T) -> bool;
|
||||
}
|
||||
|
||||
impl<T> Filter<T> for () {
|
||||
fn filter(_: &T) -> bool { true }
|
||||
}
|
||||
|
||||
/// An abstraction of a value stored within storage, but possibly as part of a larger composite
|
||||
/// item.
|
||||
pub trait StoredMap<K, T> {
|
||||
|
||||
Reference in New Issue
Block a user