mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Allow "anonymous" proxied accounts (#6236)
* Anonymous proxiers * More testing * More testing * Build fix * Build fix * Benchmarks. * fix benchmarking * add weights * fix line width Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -47,10 +47,25 @@ impl<T> Filter<T> for () {
|
||||
pub trait InstanceFilter<T> {
|
||||
/// Determine if a given value should be allowed through the filter (returns `true`) or not.
|
||||
fn filter(&self, _: &T) -> bool;
|
||||
|
||||
/// Determines whether `self` matches at least all items that `o` does.
|
||||
fn is_no_less_permissive(&self, o: &Self) -> bool { !self.is_less_permissive(o) }
|
||||
|
||||
/// Determines whether `self` matches at most only the items that `o` does.
|
||||
fn is_no_more_permissive(&self, o: &Self) -> bool { !o.is_less_permissive(&self) }
|
||||
|
||||
/// Determines whether `self` matches all the items that `o` does and others.
|
||||
fn is_more_permissive(&self, o: &Self) -> bool { o.is_less_permissive(self) }
|
||||
|
||||
/// Determines whether `self` does not match all the items that `_o` does, nor any others.
|
||||
///
|
||||
/// NOTE: This is the only `*permissive` function that needs to be reimplemented.
|
||||
fn is_less_permissive(&self, _o: &Self) -> bool { true }
|
||||
}
|
||||
|
||||
impl<T> InstanceFilter<T> for () {
|
||||
fn filter(&self, _: &T) -> bool { true }
|
||||
fn is_less_permissive(&self, _o: &Self) -> bool { false }
|
||||
}
|
||||
|
||||
/// An abstraction of a value stored within storage, but possibly as part of a larger composite
|
||||
|
||||
Reference in New Issue
Block a user