referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait InstanceFilter

Source
pub trait InstanceFilter<T>:
    Sized
    + Send
    + Sync {
    // Required method
    fn filter(&self, _: &T) -> bool;

    // Provided method
    fn is_superset(&self, _o: &Self) -> bool { ... }
}
Expand description

Simple trait for providing a filter over a reference to some type, given an instance of itself.

Required Methods§

Source

fn filter(&self, _: &T) -> bool

Determine if a given value should be allowed through the filter (returns true) or not.

Provided Methods§

Source

fn is_superset(&self, _o: &Self) -> bool

Determines whether self matches at least everything that _o does.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> InstanceFilter<T> for ()

Source§

fn filter(&self, _: &T) -> bool

Source§

fn is_superset(&self, _o: &Self) -> bool

Implementors§