mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Generalised proxies (#6156)
* Initial work * It should work * Fix node * Fix tests * Initial test * Tests * Expunge proxy functionality from democracy and elections * Allow different proxy types * Repotted * Build * Build * Making a start on weights * Undo breaking change * Line widths. * Fix * fix tests * finish benchmarks? * Storage name! * Utility -> Proxy * proxy weight * add proxy weight * remove weights * Update transfer constraint * Again, fix constraints * Fix negation * Update frame/proxy/Cargo.toml Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Remove unneeded event. * Grumbles * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,16 @@ impl<T> Filter<T> for () {
|
||||
fn filter(_: &T) -> bool { true }
|
||||
}
|
||||
|
||||
/// Simple trait for providing a filter over a reference to some type, given an instance of itself.
|
||||
pub trait InstanceFilter<T> {
|
||||
/// Determine if a given value should be allowed through the filter (returns `true`) or not.
|
||||
fn filter(&self, _: &T) -> bool;
|
||||
}
|
||||
|
||||
impl<T> InstanceFilter<T> for () {
|
||||
fn filter(&self, _: &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